From 76b7257fdf2c9406533bec2abf2ca5e8d1d58276 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 23 Oct 2021 15:59:48 +0200 Subject: [PATCH] Static link pthread. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cfc2ad..06554aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ()