From b499ed3d20e4be101cfd954d5f07e50ec4cc14ca Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 19 Jun 2024 00:20:35 +0200 Subject: [PATCH] CI updates --- .github/workflows/ci.yml | 30 ++++++++++++++++++------------ NEWS | 4 ++-- doc/upx.1 | 2 +- src/util/util.cpp | 2 +- src/version.h | 4 ++-- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad43b3ba..babb8317 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -196,7 +196,7 @@ jobs: include: # NOTE: macos does not have "env -C"; only with brew coreutils # NOTE: macos-11 does not have "readlink -f"; only on macos >= 12 or with brew coreutils - # { os: macos-11, gcc: gcc-10, gxx: g++-10, testsuite: true } # scheduled for removal from GitHub actions + # { os: macos-11, gcc: gcc-10, gxx: g++-10, testsuite: true } # macos-11 is EOL; scheduled for removal from GitHub actions - { os: macos-12, gcc: gcc-11, gxx: g++-11, testsuite: true } - { os: macos-13, testsuite: true } # use default Xcode-15; NOTE: gcc-12 on macos-13 does not work with Xcode-15 - { os: macos-13, gcc: gcc-12, gxx: g++-12, testsuite: true, xcode_version: 14.3.1 } @@ -467,8 +467,7 @@ jobs: - { zig_target: mipsel-linux-musl, qemu: qemu-mipsel } - { zig_target: mipsel-linux-muslsf, zig_flags: -msoft-float, qemu: qemu-mipsel } - { zig_target: powerpc-linux-musl, qemu: qemu-ppc } - # powerpc64: obscure problem with C++ exceptions in UPX doctest checks; use -fPIC to work-around - - { zig_target: powerpc64-linux-musl, zig_flags: -fPIC, qemu: qemu-ppc64 } + - { zig_target: powerpc64-linux-musl, qemu: qemu-ppc64 } - { zig_target: powerpc64le-linux-musl, qemu: qemu-ppc64le } - { zig_target: x86_64-linux-gnu.2.3.4, qemu: qemu-x86_64 } # can use QEMU because of gcompat - { zig_target: x86_64-linux-musl, qemu: qemu-x86_64 } @@ -492,10 +491,10 @@ jobs: shell: sh run: | apk update && apk upgrade && apk add bash cmake curl file git make parallel tar xz - mkdir -p ~/.parallel && : > ~/.parallel/$(echo 6305-4721 | tr 0-7 leticlwi) # set PATH like in Ubuntu echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV git config --global --add safe.directory '*' # needed when running in a container + mkdir -p ~/.parallel && : > ~/.parallel/$(echo 6305-4721 | tr 0-7 leticlwi) - uses: actions/checkout@v4 with: { submodules: true } - name: ${{ format('Install Zig {0}', env.ZIG_DIST_VERSION) }} @@ -508,10 +507,6 @@ jobs: # TODO FIXME: problem with self-packed upx and musl+gcompat: "Not a valid dynamic program" echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV fi - # update ZIG_TARGET - ZIG_TARGET=${ZIG_TARGET/i386-/x86-} # i386 => x86 - ZIG_TARGET=${ZIG_TARGET/muslsf/musl} # muslsf => musl - echo "ZIG_TARGET=$ZIG_TARGET" >> $GITHUB_ENV # install zig; note that ~/.local/bin is included in the default $PATH on Ubuntu mkdir -p -v ~/.local/bin cd ~/.local/bin @@ -524,12 +519,23 @@ jobs: #echo "PATH=$PATH" && which zig echo -n 'zig version: '; zig version # create wrapper scripts (needed for CMake) - echo -e '#!/bin/sh\nexec zig ar "$@"' > zig-ar - echo -e '#!/bin/sh\nexec zig cc -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CFLAGS "$@"' > zig-cc - echo -e '#!/bin/sh\nexec zig c++ -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CXXFLAGS "$@"' > zig-cxx - echo -e '#!/bin/sh\nexec zig ranlib "$@"' > zig-ranlib + log= + log='set -x\n' + echo -e '#!/bin/sh\n'$log'exec zig ar "$@"' > zig-ar + echo -e '#!/bin/sh\n'$log'exec zig cc -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CFLAGS "$@"' > zig-cc + echo -e '#!/bin/sh\n'$log'exec zig c++ -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CXXFLAGS "$@"' > zig-cxx + echo -e '#!/bin/sh\n'$log'exec zig ranlib "$@"' > zig-ranlib chmod +x zig-ar zig-cc zig-cxx zig-ranlib ls -la; head zig-ar zig-cc zig-cxx zig-ranlib + # update ZIG_TARGET + ZIG_TARGET=${ZIG_TARGET/i386-/x86-} # i386 => x86 + ZIG_TARGET=${ZIG_TARGET/muslsf/musl} # muslsf => musl + echo "ZIG_TARGET=$ZIG_TARGET" >> $GITHUB_ENV + # -fPIE is for compilation only => also use the correct linker flag "-pie" + # INFO: it seems the zig driver does handle this automatically(??), so not really needed + if test "X$ZIG_PIC" = "X-fPIE"; then true; + echo "ZIG_FLAGS=$ZIG_FLAGS --start-no-unused-arguments -pie --end-no-unused-arguments" >> $GITHUB_ENV + fi - name: ${{ format('Build Release with zig-cc -target {0} {1}', env.ZIG_TARGET, env.ZIG_PIC) }} run: | make UPX_XTARGET=zig/${ZIG_TARGET}${ZIG_PIC} xtarget/release \ diff --git a/NEWS b/NEWS index e128402e..f68e377e 100644 --- a/NEWS +++ b/NEWS @@ -4,9 +4,9 @@ User visible changes for UPX Changes in 4.3.0 (XX XXX XXXX): * bug fixes - see https://github.com/upx/upx/milestone/18 - * PT_MIPS_ABIFLAGS is now fowarded into the compressed output; + * ELF: PT_MIPS_ABIFLAGS is now fowarded into the compressed output; qemu-mips can choose the right floating-point emulation - * --unmap-all-pages completely avoids /proc/self/exe + * ELF: --unmap-all-pages completely avoids /proc/self/exe Changes in 4.2.4 (09 May 2024): * bug fixes - see https://github.com/upx/upx/milestone/17 diff --git a/doc/upx.1 b/doc/upx.1 index 9ed7be22..5964f44f 100644 --- a/doc/upx.1 +++ b/doc/upx.1 @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "UPX 1" -.TH UPX 1 2024-05-10 "upx 4.3.0" " " +.TH UPX 1 2024-06-19 "upx 4.3.0" " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/util/util.cpp b/src/util/util.cpp index 52e79140..c09464c5 100644 --- a/src/util/util.cpp +++ b/src/util/util.cpp @@ -972,7 +972,7 @@ TEST_CASE("get_ratio") { #if defined(__wasi__) // TODO later - wait for wasm/wasi exception handling proposal extern "C" { -void __cxa_allocate_exception() { std::terminate(); } +void __cxa_allocate_exception() throw() { std::terminate(); } void __cxa_throw() { std::terminate(); } } // extern "C" #endif diff --git a/src/version.h b/src/version.h index 25e13943..490d5946 100644 --- a/src/version.h +++ b/src/version.h @@ -2,6 +2,6 @@ #define UPX_VERSION_HEX 0x040300 /* 04.03.00 */ #define UPX_VERSION_STRING "4.3.0" #define UPX_VERSION_STRING4 "4.30" -#define UPX_VERSION_DATE "May 10th 2024" -#define UPX_VERSION_DATE_ISO "2024-05-10" +#define UPX_VERSION_DATE "Jun 19th 2024" +#define UPX_VERSION_DATE_ISO "2024-06-19" #define UPX_VERSION_YEAR "2024"