1
0
mirror of https://github.com/upx/upx.git synced 2025-08-11 22:52:30 +08:00

Update CI to use lastest zlib. Update Makefile.

This commit is contained in:
Markus F.X.J. Oberhumer
2021-01-01 23:24:31 +01:00
parent 16af6e1a29
commit baa1ed9be3
4 changed files with 11 additions and 11 deletions

View File

@ -179,7 +179,7 @@ fi # CC_OVERRIDE
[[ -z $upx_SRCDIR ]] && upx_SRCDIR=$(readlink -mn -- $argv0dir/..) [[ -z $upx_SRCDIR ]] && upx_SRCDIR=$(readlink -mn -- $argv0dir/..)
[[ -z $ucl_SRCDIR ]] && ucl_SRCDIR=$(readlink -mn -- $upx_SRCDIR/../deps/ucl-1.03) [[ -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 $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 # build dirs
mkbuilddirs() { mkbuilddirs() {
@ -207,7 +207,7 @@ fi
[[ -z $upx_BUILDDIR ]] && upx_BUILDDIR=$(readlink -mn -- "$toptop_bdir/upx") [[ -z $upx_BUILDDIR ]] && upx_BUILDDIR=$(readlink -mn -- "$toptop_bdir/upx")
[[ -z $ucl_BUILDDIR ]] && ucl_BUILDDIR=$(readlink -mn -- "$toptop_bdir/ucl-1.03") [[ -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 $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") [[ -z $lcov_OUTPUTDIR ]] && lcov_OUTPUTDIR=$(readlink -mn -- "$toptop_bdir/.lcov-results")
unset toptop_builddir toptop_bdir unset toptop_builddir toptop_bdir

View File

@ -116,10 +116,10 @@ jobs:
md build build\%C% deps md build build\%C% deps
cd 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 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 git clone --depth=1 https://github.com/upx/upx-testsuite
tar -xzf ucl-1.03.tar.gz 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) @REM patch UCL for newer msvc (vsnprintf issue)
sed -i '/# *define.*snprintf *_v*snprintf$/d' ucl-1.03/acc/acc_auto.h 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 @REM setup directories following the VPATH build in travis_build.sh
where cl & where link where cl & where link
set BDIR=%H%\build\%C%\%B% 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 set DEFS=-D_CRT_SECURE_NO_WARNINGS
git rev-parse --short=12 HEAD > %BDIR%\upx\.GITREV.txt git rev-parse --short=12 HEAD > %BDIR%\upx\.GITREV.txt
@REM build UCL @REM build UCL
@ -143,15 +143,15 @@ jobs:
cl -MT -O2 -W4 %DEFS% -I%s%\include -I%s% -c %s%\src\*.c cl -MT -O2 -W4 %DEFS% -I%s%\include -I%s% -c %s%\src\*.c
link -lib -out:ucl.lib *.obj link -lib -out:ucl.lib *.obj
@REM build zlib @REM build zlib
cd %BDIR%\zlib-1.2.8 cd %BDIR%\zlib-1.2.11
cl -MT -O2 -W2 %DEFS% -c %H%\deps\zlib-1.2.8\*.c cl -MT -O2 -W2 %DEFS% -c %H%\deps\zlib-1.2.11\*.c
link -lib -out:zlib.lib *.obj link -lib -out:zlib.lib *.obj
@REM build UPX @REM build UPX
cd %BDIR%\upx cd %BDIR%\upx
set s=%H%\upx\src set s=%H%\upx\src
cat .GITREV.txt cat .GITREV.txt
set /p GITREV=<.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' - name: 'Basic tests'
shell: cmd shell: cmd

View File

@ -61,7 +61,7 @@ LIBS += -lucl -lz
# LZMA from https://github.com/upx/upx-lzma-sdk # LZMA from https://github.com/upx/upx-lzma-sdk
include $(top_srcdir)/src/stub/src/c/Makevars.lzma include $(top_srcdir)/src/stub/src/c/Makevars.lzma
# optional flags # default flags that you can change or override
ifeq ($(BUILD_TYPE_DEBUG),1) ifeq ($(BUILD_TYPE_DEBUG),1)
CXXFLAGS_OPTIMIZE ?= -O0 -g CXXFLAGS_OPTIMIZE ?= -O0 -g
else else
@ -85,7 +85,7 @@ mf.CXXFLAGS += $(CXXFLAGS_NO_DELETE_NULL_POINTER_CHECKS)
mf.CXXFLAGS += -fno-strict-aliasing -fno-strict-overflow mf.CXXFLAGS += -fno-strict-aliasing -fno-strict-overflow
mf.CXXFLAGS += -funsigned-char mf.CXXFLAGS += -funsigned-char
mf.CXXFLAGS += $(CXXFLAGS_SANITIZE) 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) mf.CXXFLAGS += $(CXXFLAGS_WERROR)
# rules # rules

View File

@ -413,7 +413,7 @@ void show_version(int x)
fprintf(fp, "Copyright (C) 2000-2021 John F. Reiser\n"); fprintf(fp, "Copyright (C) 2000-2021 John F. Reiser\n");
fprintf(fp, "Copyright (C) 2002-2021 Jens Medoch\n"); fprintf(fp, "Copyright (C) 2002-2021 Jens Medoch\n");
#if (WITH_ZLIB) #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 #endif
#if (WITH_LZMA) #if (WITH_LZMA)
fprintf(fp, "Copyright (C) 1999" "-2006 Igor Pavlov\n"); fprintf(fp, "Copyright (C) 1999" "-2006 Igor Pavlov\n");