From 88cebb05ad67e306f51c74ff0f0ea1c83add3b39 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 17 Apr 2021 18:38:32 +0200 Subject: LibC+LibPthread: Implement function forwarding for libpthread GCC will insert various calls to pthread functions when compiling C++ code with static initializers, even when the user doesn't link their program against libpthread explicitly. This is used to make static initializers thread-safe, e.g. when building a library that does not itself use thread functionality and thus does not link against libpthread - but is intended to be used with other code that does use libpthread explicitly. This makes these symbols available in libc. --- Userland/DynamicLoader/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Userland/DynamicLoader/CMakeLists.txt') diff --git a/Userland/DynamicLoader/CMakeLists.txt b/Userland/DynamicLoader/CMakeLists.txt index 85f93cf855..3ce9836039 100644 --- a/Userland/DynamicLoader/CMakeLists.txt +++ b/Userland/DynamicLoader/CMakeLists.txt @@ -19,8 +19,7 @@ endif() file(GLOB LIBSYSTEM_SOURCES "../Libraries/LibSystem/*.cpp") -list(FILTER LIBC_SOURCES1 EXCLUDE REGEX ".+crt0.cpp") -list(FILTER LIBC_SOURCES1 EXCLUDE REGEX ".+crt0.+.cpp") +add_definitions(-D_DYNAMIC_LOADER) set(SOURCES ${LOADER_SOURCES} ${AK_SOURCES} ${ELF_SOURCES} ${LIBC_SOURCES1} ${LIBC_SOURCES2} ${LIBC_SOURCES3} ${LIBSYSTEM_SOURCES}) -- cgit v1.2.3