From 2123a01151d664ddf5f41c257b660b43a6ad5add Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 29 Aug 2021 16:08:58 +0200 Subject: [PATCH] Fixes for linking pthread statically --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b8353b..527fe3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,7 +148,7 @@ if (STATICC) set(_LINKS ${_LINKS} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lm -lstdc++ -lpthread -Wl,-Bdynamic) SET(_TESTLINKS ${_TESTLINKS} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic) else() - SET(_LINKS ${_LINKS} -lpthread) + SET(_LINKS ${_LINKS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive) endif() target_link_libraries(pkmnLib PUBLIC ${_LINKS})