From baa1ed9be31ad2ed7bbb8b9ad893d610e8f975f6 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Fri, 1 Jan 2021 23:24:31 +0100 Subject: [PATCH] Update CI to use lastest zlib. Update Makefile. --- .github/travis_init.sh | 4 ++-- .github/workflows/ci.yml | 12 ++++++------ src/Makefile | 4 ++-- src/help.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/travis_init.sh b/.github/travis_init.sh index b6a5e34c..33e03bc0 100644 --- a/.github/travis_init.sh +++ b/.github/travis_init.sh @@ -179,7 +179,7 @@ fi # CC_OVERRIDE [[ -z $upx_SRCDIR ]] && upx_SRCDIR=$(readlink -mn -- $argv0dir/..) [[ -z $ucl_SRCDIR ]] && ucl_SRCDIR=$(readlink -mn -- $upx_SRCDIR/../deps/ucl-1.03) [[ -z $upx_testsuite_SRCDIR ]] && upx_testsuite_SRCDIR=$(readlink -mn -- $upx_SRCDIR/../deps/upx-testsuite) -[[ -z $zlib_SRCDIR ]] && zlib_SRCDIR=$(readlink -mn -- $upx_SRCDIR/../deps/zlib-1.2.8) +[[ -z $zlib_SRCDIR ]] && zlib_SRCDIR=$(readlink -mn -- $upx_SRCDIR/../deps/zlib-1.2.11) # build dirs mkbuilddirs() { @@ -207,7 +207,7 @@ fi [[ -z $upx_BUILDDIR ]] && upx_BUILDDIR=$(readlink -mn -- "$toptop_bdir/upx") [[ -z $ucl_BUILDDIR ]] && ucl_BUILDDIR=$(readlink -mn -- "$toptop_bdir/ucl-1.03") [[ -z $upx_testsuite_BUILDDIR ]] && upx_testsuite_BUILDDIR=$(readlink -mn -- "$toptop_bdir/upx-testsuite") -[[ -z $zlib_BUILDDIR ]] && zlib_BUILDDIR=$(readlink -mn -- "$toptop_bdir/zlib-1.2.8") +[[ -z $zlib_BUILDDIR ]] && zlib_BUILDDIR=$(readlink -mn -- "$toptop_bdir/zlib-1.2.11") [[ -z $lcov_OUTPUTDIR ]] && lcov_OUTPUTDIR=$(readlink -mn -- "$toptop_bdir/.lcov-results") unset toptop_builddir toptop_bdir diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6f7e73a..5bfa51e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,10 +116,10 @@ jobs: md build build\%C% deps cd deps curl -sS -L --retry 5 -o ucl-1.03.tar.gz "https://github.com/upx/upx/releases/download/v3.00/ucl-1.03.tar.gz" - curl -sS -L --retry 5 -o zlib-1.2.8.tar.gz "https://github.com/upx/upx/releases/download/v3.00/zlib-1.2.8.tar.gz" + curl -sS -L --retry 5 -o zlib-1.2.11.tar.gz "https://github.com/upx/upx/releases/download/v3.00/zlib-1.2.11.tar.gz" git clone --depth=1 https://github.com/upx/upx-testsuite tar -xzf ucl-1.03.tar.gz - tar -xzf zlib-1.2.8.tar.gz + tar -xzf zlib-1.2.11.tar.gz @REM patch UCL for newer msvc (vsnprintf issue) sed -i '/# *define.*snprintf *_v*snprintf$/d' ucl-1.03/acc/acc_auto.h @@ -134,7 +134,7 @@ jobs: @REM setup directories following the VPATH build in travis_build.sh where cl & where link set BDIR=%H%\build\%C%\%B% - md %BDIR% %BDIR%\ucl-1.03 %BDIR%\upx %BDIR%\upx-testsuite %BDIR%\zlib-1.2.8 + md %BDIR% %BDIR%\ucl-1.03 %BDIR%\upx %BDIR%\upx-testsuite %BDIR%\zlib-1.2.11 set DEFS=-D_CRT_SECURE_NO_WARNINGS git rev-parse --short=12 HEAD > %BDIR%\upx\.GITREV.txt @REM build UCL @@ -143,15 +143,15 @@ jobs: cl -MT -O2 -W4 %DEFS% -I%s%\include -I%s% -c %s%\src\*.c link -lib -out:ucl.lib *.obj @REM build zlib - cd %BDIR%\zlib-1.2.8 - cl -MT -O2 -W2 %DEFS% -c %H%\deps\zlib-1.2.8\*.c + cd %BDIR%\zlib-1.2.11 + cl -MT -O2 -W2 %DEFS% -c %H%\deps\zlib-1.2.11\*.c link -lib -out:zlib.lib *.obj @REM build UPX cd %BDIR%\upx set s=%H%\upx\src cat .GITREV.txt set /p GITREV=<.GITREV.txt - cl -MT -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% -DUCL_NO_ASM -I%s%\lzma-sdk -I%H%\deps\ucl-1.03\include -I%H%\deps\zlib-1.2.8 -Feupx.exe %s%\*.cpp %BDIR%\ucl-1.03\ucl.lib %BDIR%\zlib-1.2.8\zlib.lib + cl -MT -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% -DUCL_NO_ASM -I%s%\lzma-sdk -I%H%\deps\ucl-1.03\include -I%H%\deps\zlib-1.2.11 -Feupx.exe %s%\*.cpp %BDIR%\ucl-1.03\ucl.lib %BDIR%\zlib-1.2.11\zlib.lib - name: 'Basic tests' shell: cmd diff --git a/src/Makefile b/src/Makefile index 527f4d0b..07273ccb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,7 +61,7 @@ LIBS += -lucl -lz # LZMA from https://github.com/upx/upx-lzma-sdk include $(top_srcdir)/src/stub/src/c/Makevars.lzma -# optional flags +# default flags that you can change or override ifeq ($(BUILD_TYPE_DEBUG),1) CXXFLAGS_OPTIMIZE ?= -O0 -g else @@ -85,7 +85,7 @@ mf.CXXFLAGS += $(CXXFLAGS_NO_DELETE_NULL_POINTER_CHECKS) mf.CXXFLAGS += -fno-strict-aliasing -fno-strict-overflow mf.CXXFLAGS += -funsigned-char mf.CXXFLAGS += $(CXXFLAGS_SANITIZE) -mf.CXXFLAGS += -Wall -W -Wcast-align -Wcast-qual -Wmissing-declarations -Wpointer-arith -Wshadow -Wvla -Wwrite-strings +mf.CXXFLAGS += -Wall -Wextra -Wcast-align -Wcast-qual -Wmissing-declarations -Wpointer-arith -Wshadow -Wvla -Wwrite-strings mf.CXXFLAGS += $(CXXFLAGS_WERROR) # rules diff --git a/src/help.cpp b/src/help.cpp index e32f86fb..6e98ea01 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -413,7 +413,7 @@ void show_version(int x) fprintf(fp, "Copyright (C) 2000-2021 John F. Reiser\n"); fprintf(fp, "Copyright (C) 2002-2021 Jens Medoch\n"); #if (WITH_ZLIB) - fprintf(fp, "Copyright (C) 1995" "-2005 Jean-loup Gailly and Mark Adler\n"); + fprintf(fp, "Copyright (C) 1995" "-2017 Jean-loup Gailly and Mark Adler\n"); #endif #if (WITH_LZMA) fprintf(fp, "Copyright (C) 1999" "-2006 Igor Pavlov\n");