From 09de80c4ce4b6bf7cb000a2c4fe62547a4a6a428 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 13 Apr 2025 16:09:41 +0200 Subject: [PATCH] test --- .docker/build-linux.sh | 2 +- CMakeLists.txt | 34 ---------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/.docker/build-linux.sh b/.docker/build-linux.sh index 70350fd7..8ddee40b 100755 --- a/.docker/build-linux.sh +++ b/.docker/build-linux.sh @@ -258,7 +258,7 @@ if [[ "-$BUILD_TYPE-" == *-static-* ]]; then export LDFLAGS="${LDFLAGS} -L/opt/static-libs/$COMPILER/lib" if [[ "$ARCH" == "aarch64" ]]; then # For some reason, this dependency of libunwind is not resolved on aarch64 - export LDFLAGS="${LDFLAGS} -lz" + export LDFLAGS="${LDFLAGS} -lz -lgcc_eh" fi CMAKE_ARGS="${CMAKE_ARGS} -DSTATIC_BUILD_DO_NOT_USE=1 -DWITH_UNIVERSAL_BINARY=1 -DWITH_FUSE_EXTRACT_BINARY=1" if [[ "$BUILD_TYPE" != *-minimal-* ]]; then diff --git a/CMakeLists.txt b/CMakeLists.txt index 626c2afc..b57e722e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -907,40 +907,6 @@ foreach(tgt ${TEST_TARGETS}) target_link_libraries(${tgt} PRIVATE dwarfs_writer dwarfs_rewrite dwarfs_extractor) endforeach() -if(STATIC_BUILD_DO_NOT_USE) - # ................................................................... - # Each library name given to the NAMES option is first considered as a library - # file name and then considered with platform-specific prefixes (e.g. lib) and - # suffixes (e.g. .so). - # ................................................................... - - function(IMPORT_STATIC_LIB TARGET NAME) - find_library(_TMP_LIB_LOC_${TARGET} ${NAME} NO_CACHE REQUIRED) - add_library(${TARGET} STATIC IMPORTED) - set_target_properties(${TARGET} PROPERTIES IMPORTED_LOCATION - ${_TMP_LIB_LOC_${TARGET}}) - endfunction() - - # import_static_lib(static_libdl "libdl.a") - # import_static_lib(static_libm "libm.a") - # import_static_lib(static_librt "librt.a") - - foreach(tgt ${BINARY_TARGETS} ${TEST_TARGETS}) - # ................................................................... - # -static-libgcc above and gcc_eh below is all together an ugly trick to - # enforce static linking - # ................................................................... - target_link_libraries( - ${tgt} - PRIVATE - # static_libdl - # static_libm - # static_librt - gcc_eh - ) - endforeach() -endif(STATIC_BUILD_DO_NOT_USE) - foreach(tgt ${TEST_TARGETS}) list(APPEND REALCLEAN_FILES "${tgt}[1]_include.cmake") endforeach()