summaryrefslogtreecommitdiff
path: root/Userland/DynamicLoader/CMakeLists.txt
diff options
context:
space:
mode:
authorGunnar Beutner <gunnar@beutner.name>2021-04-17 18:38:32 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-20 21:08:17 +0200
commit88cebb05ad67e306f51c74ff0f0ea1c83add3b39 (patch)
treeae2f48ebad39211ad41f3f712202065a3d4f1442 /Userland/DynamicLoader/CMakeLists.txt
parentdb3fd11646189d1b5ac416eaeef19fdfcc46570e (diff)
downloadserenity-88cebb05ad67e306f51c74ff0f0ea1c83add3b39.zip
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.
Diffstat (limited to 'Userland/DynamicLoader/CMakeLists.txt')
-rw-r--r--Userland/DynamicLoader/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
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})