Static link pthread.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2021-10-23 15:59:48 +02:00
parent 5877bb5ec0
commit 76b7257fdf
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 2 additions and 2 deletions

View File

@ -143,8 +143,8 @@ endif ()
if (STATICC)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
message(STATUS "Linking C library statically")
set(_LINKS ${_LINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -Wl,-Bdynamic)
SET(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -Wl,-Bdynamic)
set(_LINKS ${_LINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
SET(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
else ()
SET(_LINKS ${_LINKS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
endif ()