diff --git a/.github/travis_build.sh b/.github/travis_build.sh index 3e2a3937..104a7b27 100644 --- a/.github/travis_build.sh +++ b/.github/travis_build.sh @@ -39,10 +39,34 @@ set -x # if [[ $BM_X =~ (^|\+)rebuild-stubs($|\+) ]]; then - bin_upx=$(readlink -en -- "$upx_SRCDIR/../deps/bin-upx-20160918") + if [[ -f "$HOME/local/bin/bin-upx/upx-stubtools-check-version" ]]; then + bin_upx=$(readlink -en -- "$HOME/local/bin/bin-upx") + elif [[ -f "$HOME/.local/bin/bin-upx/upx-stubtools-check-version" ]]; then + bin_upx=$(readlink -en -- "$HOME/.local/bin/bin-upx") + else + bin_upx=$(readlink -en -- "$upx_SRCDIR/../deps/bin-upx-20160918") + fi cd / && cd $upx_SRCDIR || exit 1 + extra_subdirs=() + extra_subdirs+=( src/stub/src/arch/amd64 ) + extra_subdirs+=( src/stub/src/arch/arm/v4a ) + extra_subdirs+=( src/stub/src/arch/arm/v4t ) + extra_subdirs+=( src/stub/src/arch/i386 ) + extra_subdirs+=( src/stub/src/arch/m68k/m68000 ) + extra_subdirs+=( src/stub/src/arch/m68k/m68020 ) + extra_subdirs+=( src/stub/src/arch/mips/r3000 ) + #extra_subdirs+=( src/stub/src/arch/powerpc/32 ) # FIXME / TODO + extra_subdirs+=( src/stub/src/arch/powerpc/64le ) make -C src/stub maintainer-clean + for d in ${extra_subdirs[@]}; do + make -C $d -f Makefile.extra maintainer-clean + git status $d || true + done + git status || true failed=0 + for d in ${extra_subdirs[@]}; do + PATH="$bin_upx:$PATH" make -C $d -f Makefile.extra || failed=1 + done PATH="$bin_upx:$PATH" make -C src/stub all || failed=1 if [[ $failed != 0 ]]; then echo "UPX-ERROR: FATAL: rebuild-stubs failed" @@ -58,7 +82,7 @@ if [[ $BM_X =~ (^|\+)rebuild-stubs($|\+) ]]; then echo "X=rebuild-stubs done. Exiting." exit 0 fi - unset bin_upx failed + unset bin_upx extra_subdirs d failed fi # diff --git a/.github/travis_init.sh b/.github/travis_init.sh index 91dae9c9..28a5a9a1 100644 --- a/.github/travis_init.sh +++ b/.github/travis_init.sh @@ -150,7 +150,7 @@ case $BM_C in clang*-m64) CC="$CC -m64"; CXX="$CXX -m64" ;; gcc*-m32) CC="$CC -m32"; CXX="$CXX -m32" ;; gcc*-m64) CC="$CC -m64"; CXX="$CXX -m64" ;; - gcc*-mx32) CC="$CC -mx32"; CXX="$CXX -mx32"; BUILD_LOCAL_ZLIB=1 ;; + gcc*-mx32) CC="$CC -mx32"; CXX="$CXX -mx32"; BUILD_LOCAL_UCL=1; BUILD_LOCAL_ZLIB=1 ;; esac if [[ $BM_C =~ (^|\-)(clang|gcc)($|\-) ]]; then CC="$CC -std=gnu89" diff --git a/.travis.yml b/.travis.yml index ed94a6db..83d609e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,7 +75,7 @@ matrix: sudo: required dist: trusty compiler: gcc - env: C=gcc-4.8-mx32 T=SKIP + env: C=gcc-4.8-mx32 addons: { apt: { packages: [ "g++-multilib", "libx32stdc++-4.8-dev" ] } } - os: linux compiler: gcc diff --git a/src/stub/Makefile b/src/stub/Makefile index cde65685..16eff03f 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -37,8 +37,9 @@ include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local) # update $PATH for our special stub build tools ifneq ($(wildcard $(HOME)/local/bin/bin-upx/upx-stubtools-check-version),) export PATH := $(HOME)/local/bin/bin-upx:$(PATH) -endif -ifneq ($(wildcard $(HOME)/bin/bin-upx/upx-stubtools-check-version),) +else ifneq ($(wildcard $(HOME)/.local/bin/bin-upx/upx-stubtools-check-version),) +export PATH := $(HOME)/.local/bin/bin-upx:$(PATH) +else ifneq ($(wildcard $(HOME)/bin/bin-upx/upx-stubtools-check-version),) export PATH := $(HOME)/bin/bin-upx:$(PATH) endif diff --git a/src/stub/scripts/upx-clang-format b/src/stub/scripts/upx-clang-format index 9833f661..5f29729f 100755 --- a/src/stub/scripts/upx-clang-format +++ b/src/stub/scripts/upx-clang-format @@ -7,6 +7,9 @@ set -e; set -o pipefail CLANG_FORMAT="$HOME/local/bin/bin-upx/clang-format-3.9.0" if [[ ! -f $CLANG_FORMAT ]]; then +CLANG_FORMAT="$HOME/.local/bin/bin-upx/clang-format-3.9.0" +fi +if [[ ! -f $CLANG_FORMAT ]]; then CLANG_FORMAT="$HOME/bin/bin-upx/clang-format-3.9.0" fi if [[ ! -f $CLANG_FORMAT ]]; then diff --git a/src/stub/tools/armpe/Makefile b/src/stub/tools/armpe/Makefile index 790a8404..56cbfc33 100644 --- a/src/stub/tools/armpe/Makefile +++ b/src/stub/tools/armpe/Makefile @@ -8,10 +8,11 @@ export LC_ALL = C export SHELL = /bin/sh # update $PATH for our special stub build tools -ifneq ($(wildcard $(HOME)/local/bin/bin-upx/.),) +ifneq ($(wildcard $(HOME)/local/bin/bin-upx/upx-stubtools-check-version),) export PATH := $(HOME)/local/bin/bin-upx:$(PATH) -endif -ifneq ($(wildcard $(HOME)/bin/bin-upx/.),) +else ifneq ($(wildcard $(HOME)/.local/bin/bin-upx/upx-stubtools-check-version),) +export PATH := $(HOME)/.local/bin/bin-upx:$(PATH) +else ifneq ($(wildcard $(HOME)/bin/bin-upx/upx-stubtools-check-version),) export PATH := $(HOME)/bin/bin-upx:$(PATH) endif