CI updates
This commit is contained in:
parent
87956de092
commit
f5ec8363b4
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -17,23 +17,26 @@ env:
|
|||||||
UPX_CMAKE_CONFIG_FLAGS: -Wdev --warn-uninitialized
|
UPX_CMAKE_CONFIG_FLAGS: -Wdev --warn-uninitialized
|
||||||
UPX_DEBUG_TEST_FLOAT_DIVISION_BY_ZERO: 1
|
UPX_DEBUG_TEST_FLOAT_DIVISION_BY_ZERO: 1
|
||||||
UPX_DEBUG_TEST_LIBC_QSORT: 1
|
UPX_DEBUG_TEST_LIBC_QSORT: 1
|
||||||
# 2024-04-01
|
# 2024-04-04
|
||||||
ZIG_DIST_VERSION: 0.12.0-dev.3508+a6ed3e6d2
|
ZIG_DIST_VERSION: 0.12.0-dev.3533+e5d900268
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
job-rebuild-and-verify-stubs:
|
job-rebuild-and-verify-stubs:
|
||||||
name: 'Rebuild stubs'
|
name: 'Rebuild stubs'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: 'ubuntu:23.10'
|
container: 'ubuntu:24.04' # glibc-2.39
|
||||||
|
#container: 'debian:12-slim' # also works; glibc-2.36
|
||||||
|
#container: 'debian:testing-slim' # also works
|
||||||
steps:
|
steps:
|
||||||
- name: 'Install packages'
|
- name: 'Install packages'
|
||||||
run: |
|
run: |
|
||||||
uname -a; pwd; id; umask
|
uname -a; pwd; id; umask
|
||||||
dpkg --add-architecture i386
|
dpkg --add-architecture i386
|
||||||
apt-get update && apt-get upgrade -y
|
apt-get update && apt-get upgrade -y
|
||||||
|
# install system packages
|
||||||
apt-get install -y --no-install-recommends bash ca-certificates curl git libmpc3 make perl-base xz-utils libc6:i386 zlib1g:i386
|
apt-get install -y --no-install-recommends bash ca-certificates curl git libmpc3 make perl-base xz-utils libc6:i386 zlib1g:i386
|
||||||
mkdir ../deps; cd ../deps; mkdir packages
|
|
||||||
# install python2-minimal packages from Debian-11
|
# install python2-minimal packages from Debian-11
|
||||||
|
mkdir ../deps; cd ../deps; mkdir packages
|
||||||
curl -sS -L -O 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8+deb11u1_amd64.deb'
|
curl -sS -L -O 'https://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8+deb11u1_amd64.deb'
|
||||||
curl -sS -L -O 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8+deb11u1_amd64.deb'
|
curl -sS -L -O 'https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8+deb11u1_amd64.deb'
|
||||||
dpkg -i ./*python2*.deb && rm ./*python2*.deb && ldconfig
|
dpkg -i ./*python2*.deb && rm ./*python2*.deb && ldconfig
|
||||||
@ -45,11 +48,12 @@ jobs:
|
|||||||
rm -rf ./*.deb ./packages && ldconfig
|
rm -rf ./*.deb ./packages && ldconfig
|
||||||
# install upx-stubtools
|
# install upx-stubtools
|
||||||
curl -sS -L https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz | tar -xJ
|
curl -sS -L https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz | tar -xJ
|
||||||
# config git for use in container
|
|
||||||
git config --global --add safe.directory '*'
|
|
||||||
- name: 'Check out code'
|
- name: 'Check out code'
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
with: { submodules: true }
|
# this seems to be needed when running in a container (beause of UID mismatch??)
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
|
||||||
|
git submodule update --init -- vendor/lzma-sdk
|
||||||
- name: 'Rebuild and verify stubs'
|
- name: 'Rebuild and verify stubs'
|
||||||
run: |
|
run: |
|
||||||
export PATH="$(readlink -en ../deps/bin-upx-20221212):$PATH"
|
export PATH="$(readlink -en ../deps/bin-upx-20221212):$PATH"
|
||||||
|
|||||||
@ -25,7 +25,7 @@ else()
|
|||||||
cmake_minimum_required(VERSION "3.8" FATAL_ERROR) # CMake >= 3.8 is needed for CXX_STANDARD 17
|
cmake_minimum_required(VERSION "3.8" FATAL_ERROR) # CMake >= 3.8 is needed for CXX_STANDARD 17
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# support functions
|
# support functions and some utility
|
||||||
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/functions.cmake")
|
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/functions.cmake")
|
||||||
|
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
@ -35,19 +35,19 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/functions.cmake")
|
|||||||
upx_cmake_include_hook(1_options)
|
upx_cmake_include_hook(1_options)
|
||||||
|
|
||||||
# compilation config options
|
# compilation config options
|
||||||
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/use_strict_defaults.cmake")
|
if(NOT USE_STRICT_DEFAULTS)
|
||||||
# permissive config defaults when building from source code tarball
|
# permissive config defaults when building from source code tarball
|
||||||
option(UPX_CONFIG_DISABLE_GITREV "Do not compile with default Git version info." ON)
|
option(UPX_CONFIG_DISABLE_GITREV "Do not compile with Git version info." ON)
|
||||||
option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with default sanitize options." ON)
|
option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with sanitize options." ON)
|
||||||
|
option(UPX_CONFIG_DISABLE_WERROR "Do not compile with -Werror option." ON)
|
||||||
option(UPX_CONFIG_DISABLE_WSTRICT "Do not compile with strict compiler warnings." ON)
|
option(UPX_CONFIG_DISABLE_WSTRICT "Do not compile with strict compiler warnings." ON)
|
||||||
option(UPX_CONFIG_DISABLE_WERROR "Do not compile with default -Werror option." ON)
|
|
||||||
else()
|
else()
|
||||||
# strict config defaults for Git developer builds
|
# strict config defaults for Git developer builds
|
||||||
message(STATUS "===== UPX info: strict config defaults enabled")
|
message(STATUS "===== UPX info: strict config defaults enabled")
|
||||||
option(UPX_CONFIG_DISABLE_GITREV "Do not compile with default Git version info." OFF)
|
option(UPX_CONFIG_DISABLE_GITREV "Do not compile with Git version info." OFF)
|
||||||
option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with default sanitize options." OFF)
|
option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with sanitize options." OFF)
|
||||||
|
option(UPX_CONFIG_DISABLE_WERROR "Do not compile with -Werror option." OFF)
|
||||||
option(UPX_CONFIG_DISABLE_WSTRICT "Do not compile with strict compiler warnings." OFF)
|
option(UPX_CONFIG_DISABLE_WSTRICT "Do not compile with strict compiler warnings." OFF)
|
||||||
option(UPX_CONFIG_DISABLE_WERROR "Do not compile with default -Werror option." OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# test config options (see below)
|
# test config options (see below)
|
||||||
@ -135,9 +135,11 @@ upx_set_default_build_type(Release) # default is CMAKE_BUILD_TYPE=Release
|
|||||||
project(upx VERSION "${UPX_VERSION_STRING}" LANGUAGES C CXX)
|
project(upx VERSION "${UPX_VERSION_STRING}" LANGUAGES C CXX)
|
||||||
upx_apply_build_type()
|
upx_apply_build_type()
|
||||||
|
|
||||||
# set MSVC_FRONTEND and MINGW
|
# set MSVC_FRONTEND, GNU_FRONTEND and MINGW
|
||||||
if(NOT DEFINED MSVC_FRONTEND AND (MSVC OR CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "^MSVC"))
|
if(NOT DEFINED MSVC_FRONTEND AND (MSVC OR CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "^MSVC"))
|
||||||
set(MSVC_FRONTEND 1)
|
set(MSVC_FRONTEND 1)
|
||||||
|
elseif (NOT DEFINED GNU_FRONTEND AND (CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "^GNU" OR CMAKE_C_COMPILER_ID MATCHES "(Clang|GNU)"))
|
||||||
|
set(GNU_FRONTEND 1)
|
||||||
endif()
|
endif()
|
||||||
if(NOT DEFINED MINGW AND CMAKE_C_PLATFORM_ID MATCHES "^MinGW")
|
if(NOT DEFINED MINGW AND CMAKE_C_PLATFORM_ID MATCHES "^MinGW")
|
||||||
set(MINGW 1)
|
set(MINGW 1)
|
||||||
@ -331,7 +333,7 @@ upx_sanitize_target(${t})
|
|||||||
target_compile_definitions(${t} PRIVATE BZ_NO_STDIO=1)
|
target_compile_definitions(${t} PRIVATE BZ_NO_STDIO=1)
|
||||||
if(MSVC_FRONTEND)
|
if(MSVC_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_WN} -wd4127 -wd4244 -wd4267 ${warn_WX})
|
target_compile_options(${t} PRIVATE ${warn_WN} -wd4127 -wd4244 -wd4267 ${warn_WX})
|
||||||
else()
|
elseif(GNU_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
||||||
endif()
|
endif()
|
||||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2)
|
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2)
|
||||||
@ -343,7 +345,7 @@ upx_compile_target_debug_with_O2(${t})
|
|||||||
upx_sanitize_target(${t})
|
upx_sanitize_target(${t})
|
||||||
if(MSVC_FRONTEND)
|
if(MSVC_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_WN} ${warn_WX})
|
target_compile_options(${t} PRIVATE ${warn_WN} ${warn_WX})
|
||||||
else()
|
elseif(GNU_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
||||||
endif()
|
endif()
|
||||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UCL)
|
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UCL)
|
||||||
@ -357,7 +359,7 @@ if(HAVE_UNISTD_H)
|
|||||||
endif()
|
endif()
|
||||||
if(MSVC_FRONTEND)
|
if(MSVC_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE -W3 ${warn_WX})
|
target_compile_options(${t} PRIVATE -W3 ${warn_WX})
|
||||||
else()
|
elseif(GNU_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_Wall} -Wno-cast-align -Wno-cast-qual ${warn_Werror})
|
target_compile_options(${t} PRIVATE ${warn_Wall} -Wno-cast-align -Wno-cast-qual ${warn_Werror})
|
||||||
endif()
|
endif()
|
||||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB)
|
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB)
|
||||||
@ -369,7 +371,7 @@ upx_sanitize_target(${t})
|
|||||||
target_compile_definitions(${t} PRIVATE DYNAMIC_BMI2=0 ZSTD_DISABLE_ASM=1)
|
target_compile_definitions(${t} PRIVATE DYNAMIC_BMI2=0 ZSTD_DISABLE_ASM=1)
|
||||||
if(MSVC_FRONTEND)
|
if(MSVC_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_WN} ${warn_WX})
|
target_compile_options(${t} PRIVATE ${warn_WN} ${warn_WX})
|
||||||
else()
|
elseif(GNU_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
||||||
endif()
|
endif()
|
||||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD)
|
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD)
|
||||||
@ -412,7 +414,7 @@ upx_compile_source_debug_with_O2(src/filter/filter_impl.cpp)
|
|||||||
upx_sanitize_target(${t})
|
upx_sanitize_target(${t})
|
||||||
if(MSVC_FRONTEND)
|
if(MSVC_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE -EHsc ${warn_WN} ${warn_WX})
|
target_compile_options(${t} PRIVATE -EHsc ${warn_WN} ${warn_WX})
|
||||||
else()
|
elseif(GNU_FRONTEND)
|
||||||
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
||||||
endif()
|
endif()
|
||||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UPX)
|
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UPX)
|
||||||
@ -508,7 +510,7 @@ upx_print_var(CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_AR CMAKE_RANLIB)
|
|||||||
upx_print_var(CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION CMAKE_C_COMPILER_FRONTEND_VARIANT CMAKE_C_COMPILER_ARCHITECTURE_ID CMAKE_C_PLATFORM_ID CMAKE_C_COMPILER_ABI)
|
upx_print_var(CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION CMAKE_C_COMPILER_FRONTEND_VARIANT CMAKE_C_COMPILER_ARCHITECTURE_ID CMAKE_C_PLATFORM_ID CMAKE_C_COMPILER_ABI)
|
||||||
upx_print_var(CMAKE_CXX_COMPILER_ID CMAKE_CXX_COMPILER_VERSION CMAKE_CXX_COMPILER_FRONTEND_VARIANT CMAKE_CXX_COMPILER_ARCHITECTURE_ID CMAKE_CXX_PLATFORM_ID CMAKE_CXX_COMPILER_ABI)
|
upx_print_var(CMAKE_CXX_COMPILER_ID CMAKE_CXX_COMPILER_VERSION CMAKE_CXX_COMPILER_FRONTEND_VARIANT CMAKE_CXX_COMPILER_ARCHITECTURE_ID CMAKE_CXX_PLATFORM_ID CMAKE_CXX_COMPILER_ABI)
|
||||||
upx_print_var(CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_POSITION_INDEPENDENT_CODE CMAKE_TRY_COMPILE_CONFIGURATION)
|
upx_print_var(CMAKE_INTERPROCEDURAL_OPTIMIZATION CMAKE_POSITION_INDEPENDENT_CODE CMAKE_TRY_COMPILE_CONFIGURATION)
|
||||||
upx_print_var(APPLE CLANG CYGWIN GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE UNIX WIN32 WIN64)
|
upx_print_var(APPLE CLANG CYGWIN GNU_FRONTEND GNUC MINGW MSVC MSVC_FRONTEND MSVC_IDE MSVC_TOOLSET_VERSION MSVC_VERSION MSYS UNIX WIN32 WIN64)
|
||||||
endif() # UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO
|
endif() # UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO
|
||||||
upx_print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
|
upx_print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
|
||||||
if(Threads_FOUND)
|
if(Threads_FOUND)
|
||||||
|
|||||||
@ -3,6 +3,15 @@
|
|||||||
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# set USE_STRICT_DEFAULTS
|
||||||
|
if(NOT DEFINED USE_STRICT_DEFAULTS AND IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
|
||||||
|
include("${CMAKE_CURRENT_SOURCE_DIR}/misc/cmake/use_strict_defaults.cmake" OPTIONAL)
|
||||||
|
endif()
|
||||||
|
if(NOT DEFINED USE_STRICT_DEFAULTS)
|
||||||
|
# permissive config defaults when building from source code tarball
|
||||||
|
set(USE_STRICT_DEFAULTS FALSE CACHE INTERNAL "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
# macros
|
# macros
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
@ -92,6 +101,24 @@ function(upx_print_have_symbol) # ARGV; needs include(CheckSymbolExists)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(upx_make_bool_var result_var_name var_name default_value)
|
||||||
|
set(result "${default_value}")
|
||||||
|
if(NOT ",${var_name}," STREQUAL ",,")
|
||||||
|
if(DEFINED ${var_name})
|
||||||
|
if(NOT ",${${var_name}}," STREQUAL ",,")
|
||||||
|
set(result "${${var_name}}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
# convert to bool
|
||||||
|
if(${result})
|
||||||
|
set(result ON)
|
||||||
|
else()
|
||||||
|
set(result OFF)
|
||||||
|
endif()
|
||||||
|
set(${result_var_name} "${result}" PARENT_SCOPE) # return value
|
||||||
|
endfunction()
|
||||||
|
|
||||||
# examine MinGW/Cygwin compiler configuration
|
# examine MinGW/Cygwin compiler configuration
|
||||||
function(upx_print_mingw_symbols)
|
function(upx_print_mingw_symbols)
|
||||||
if(WIN32 OR MINGW OR CYGWIN)
|
if(WIN32 OR MINGW OR CYGWIN)
|
||||||
@ -290,6 +317,8 @@ function(upx_sanitize_target) # ARGV
|
|||||||
# no-op
|
# no-op
|
||||||
elseif(MSVC_FRONTEND)
|
elseif(MSVC_FRONTEND)
|
||||||
# MSVC uses -GS (similar to -fstack-protector) by default
|
# MSVC uses -GS (similar to -fstack-protector) by default
|
||||||
|
elseif(NOT GNU_FRONTEND)
|
||||||
|
# unknown compiler
|
||||||
elseif(MINGW OR CYGWIN)
|
elseif(MINGW OR CYGWIN)
|
||||||
# avoid link errors with current MinGW-w64 versions
|
# avoid link errors with current MinGW-w64 versions
|
||||||
# see https://www.mingw-w64.org/contribute/#sanitizers-asan-tsan-usan
|
# see https://www.mingw-w64.org/contribute/#sanitizers-asan-tsan-usan
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# UPX "CMake" build file; see https://cmake.org/
|
||||||
|
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||||
|
#
|
||||||
|
|
||||||
|
if(NOT DEFINED USE_STRICT_DEFAULTS)
|
||||||
|
# strict config defaults for Git developer builds
|
||||||
|
set(USE_STRICT_DEFAULTS TRUE CACHE INTERNAL "" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# vim:set ft=cmake ts=4 sw=4 tw=0 et:
|
||||||
@ -277,49 +277,45 @@ endif
|
|||||||
# it easy to set other variables like CMAKE_AR or CMAKE_RANLIB
|
# it easy to set other variables like CMAKE_AR or CMAKE_RANLIB
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
|
|
||||||
ifneq ($(origin UPX_CMAKE_CONFIG_FLAGS),command line) # GNU make bug work-around
|
|
||||||
# GNU make bug, see https://savannah.gnu.org/bugs/index.php?64822
|
|
||||||
# and commit https://git.savannah.gnu.org/cgit/make.git/commit/?id=07187db947ba25e6c59b55f10660a04f8e9c5229
|
|
||||||
|
|
||||||
$(call check_undefined,__add_cmake_config)
|
$(call check_undefined,__add_cmake_config)
|
||||||
|
# promote an environment or Make variable to a CMake cache entry:
|
||||||
__add_cmake_config = $(and $($1),-D$1="$($1)")
|
__add_cmake_config = $(and $($1),-D$1="$($1)")
|
||||||
# pass common CMake settings from environment/make to cmake
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_VERBOSE_MAKEFILE)
|
|
||||||
# pass common CMake toolchain settings from environment/make to cmake
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_ADDR2LINE)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_AR)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_DLLTOOL)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_LINKER)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_NM)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_OBJCOPY)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_OBJDUMP)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_RANLIB)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_READELF)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_STRIP)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_TAPI)
|
|
||||||
# pass common CMake LTO toolchain settings from environment/make to cmake (for use with "-flto")
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_C_COMPILER_AR)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_C_COMPILER_RANLIB)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CXX_COMPILER_AR)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CXX_COMPILER_RANLIB)
|
|
||||||
# pass common CMake cross compilation settings from environment/make to cmake
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_SYSTEM_NAME)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_SYSTEM_PROCESSOR)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CROSSCOMPILING_EMULATOR)
|
|
||||||
# pass UPX config options from environment/make to cmake; see CMakeLists.txt
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_GITREV)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SANITIZE)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WSTRICT)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WERROR)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SELF_PACK_TEST)
|
|
||||||
# pass UPX extra compile options from environment/make to cmake; see CMakeLists.txt
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UCL)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UPX)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB)
|
|
||||||
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD)
|
|
||||||
|
|
||||||
endif # GNU make bug work-around
|
# pass common CMake settings
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_VERBOSE_MAKEFILE)
|
||||||
|
# pass common CMake toolchain settings
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_ADDR2LINE)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_AR)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_DLLTOOL)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_LINKER)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_NM)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_OBJCOPY)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_OBJDUMP)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_RANLIB)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_READELF)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_STRIP)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_TAPI)
|
||||||
|
# pass common CMake LTO toolchain settings
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_C_COMPILER_AR)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_C_COMPILER_RANLIB)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CXX_COMPILER_AR)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CXX_COMPILER_RANLIB)
|
||||||
|
# pass common CMake cross compilation settings
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_SYSTEM_NAME)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_CROSSCOMPILING_EMULATOR)
|
||||||
|
# pass UPX config options; see CMakeLists.txt
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_GITREV)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SANITIZE)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WSTRICT)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_WERROR)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_DISABLE_SELF_PACK_TEST)
|
||||||
|
# pass UPX extra compile options; see CMakeLists.txt
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UCL)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UPX)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB)
|
||||||
|
UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD)
|
||||||
|
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
# check git submodules
|
# check git submodules
|
||||||
|
|||||||
@ -8,31 +8,32 @@ set -e; set -o pipefail
|
|||||||
|
|
||||||
cmake_config_flags=()
|
cmake_config_flags=()
|
||||||
|
|
||||||
|
# promote an environment variable to a CMake cache entry:
|
||||||
__add_cmake_config() {
|
__add_cmake_config() {
|
||||||
[[ -z "${!1}" ]] || cmake_config_flags+=( -D$1="${!1}" )
|
[[ -z "${!1}" ]] || cmake_config_flags+=( -D$1="${!1}" )
|
||||||
}
|
}
|
||||||
|
|
||||||
# pass common CMake settings from environment to cmake
|
# pass common CMake settings
|
||||||
for v in CMAKE_VERBOSE_MAKEFILE; do
|
for v in CMAKE_VERBOSE_MAKEFILE; do
|
||||||
__add_cmake_config $v
|
__add_cmake_config $v
|
||||||
done
|
done
|
||||||
# pass common CMake toolchain settings from environment to cmake
|
# pass common CMake toolchain settings
|
||||||
for v in CMAKE_ADDR2LINE CMAKE_AR CMAKE_DLLTOOL CMAKE_LINKER CMAKE_NM CMAKE_OBJCOPY CMAKE_OBJDUMP CMAKE_RANLIB CMAKE_READELF CMAKE_STRIP CMAKE_TAPI; do
|
for v in CMAKE_ADDR2LINE CMAKE_AR CMAKE_DLLTOOL CMAKE_LINKER CMAKE_NM CMAKE_OBJCOPY CMAKE_OBJDUMP CMAKE_RANLIB CMAKE_READELF CMAKE_STRIP CMAKE_TAPI; do
|
||||||
__add_cmake_config $v
|
__add_cmake_config $v
|
||||||
done
|
done
|
||||||
# pass common CMake LTO toolchain settings from environment to cmake (for use with "-flto")
|
# pass common CMake LTO toolchain settings
|
||||||
for v in CMAKE_C_COMPILER_AR CMAKE_C_COMPILER_RANLIB CMAKE_CXX_COMPILER_AR CMAKE_CXX_COMPILER_RANLIB; do
|
for v in CMAKE_C_COMPILER_AR CMAKE_C_COMPILER_RANLIB CMAKE_CXX_COMPILER_AR CMAKE_CXX_COMPILER_RANLIB; do
|
||||||
__add_cmake_config $v
|
__add_cmake_config $v
|
||||||
done
|
done
|
||||||
# pass common CMake cross compilation settings from environment to cmake
|
# pass common CMake cross compilation settings
|
||||||
for v in CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PROCESSOR CMAKE_CROSSCOMPILING_EMULATOR; do
|
for v in CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PROCESSOR CMAKE_CROSSCOMPILING_EMULATOR; do
|
||||||
__add_cmake_config $v
|
__add_cmake_config $v
|
||||||
done
|
done
|
||||||
# pass UPX config options from environment to cmake; see CMakeLists.txt
|
# pass UPX config options; see CMakeLists.txt
|
||||||
for v in UPX_CONFIG_DISABLE_GITREV UPX_CONFIG_DISABLE_SANITIZE UPX_CONFIG_DISABLE_WSTRICT UPX_CONFIG_DISABLE_WERROR UPX_CONFIG_DISABLE_SELF_PACK_TEST; do
|
for v in UPX_CONFIG_DISABLE_GITREV UPX_CONFIG_DISABLE_SANITIZE UPX_CONFIG_DISABLE_WSTRICT UPX_CONFIG_DISABLE_WERROR UPX_CONFIG_DISABLE_SELF_PACK_TEST; do
|
||||||
__add_cmake_config $v
|
__add_cmake_config $v
|
||||||
done
|
done
|
||||||
# pass UPX extra compile options from environment to cmake; see CMakeLists.txt
|
# pass UPX extra compile options; see CMakeLists.txt
|
||||||
for v in UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2 UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UCL UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UPX UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD; do
|
for v in UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2 UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UCL UPX_CONFIG_EXTRA_COMPILE_OPTIONS_UPX UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD; do
|
||||||
__add_cmake_config $v
|
__add_cmake_config $v
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user