Skip to content

Commit

Permalink
Only implement workaround when linking tests statically.
Browse files Browse the repository at this point in the history
  • Loading branch information
blapie committed Dec 12, 2023
1 parent edf76bf commit d74bcc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ if (NOT CMAKE_CROSSCOMPILING AND NOT SLEEF_FORCE_FIND_PACKAGE_SSL)
set(SLEEF_OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES})
# Work around for tester3 sig segv, when linking versions of openssl (1.1.1) statically.
# This is a known issue https://github.com/openssl/openssl/issues/13872.
string(REGEX REPLACE "-lpthread" "-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" SLEEF_OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}")
if (BUILD_STATIC_TEST_BINS)
string(REGEX REPLACE
"-lpthread" "-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
SLEEF_OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}")
endif()
set(SLEEF_OPENSSL_VERSION ${OPENSSL_VERSION})
set(SLEEF_OPENSSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
endif()
Expand Down

0 comments on commit d74bcc1

Please sign in to comment.