From 5870484d1a390661138e722d3651fc296b337092 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 15 Jul 2022 16:00:33 +0200 Subject: [PATCH] LibC: Remove the `LibPthread` interface target --- Tests/Kernel/CMakeLists.txt | 8 -------- Tests/LibThreading/CMakeLists.txt | 2 +- Userland/DevTools/UserspaceEmulator/CMakeLists.txt | 2 +- Userland/Libraries/LibC/CMakeLists.txt | 4 +--- Userland/Libraries/LibThreading/CMakeLists.txt | 2 +- Userland/Utilities/CMakeLists.txt | 2 +- 6 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Tests/Kernel/CMakeLists.txt b/Tests/Kernel/CMakeLists.txt index d6d6e91d654..a139abfb5c8 100644 --- a/Tests/Kernel/CMakeLists.txt +++ b/Tests/Kernel/CMakeLists.txt @@ -50,11 +50,3 @@ set(LIBTEST_BASED_SOURCES foreach(libtest_source IN LISTS LIBTEST_BASED_SOURCES) serenity_test("${libtest_source}" Kernel) endforeach() - -target_link_libraries(elf-execve-mmap-race LibPthread) -target_link_libraries(kill-pidtid-confusion LibPthread) -target_link_libraries(nanosleep-race-outbuf-munmap LibPthread) -target_link_libraries(null-deref-close-during-select LibPthread) -target_link_libraries(null-deref-crash-during-pthread_join LibPthread) -target_link_libraries(uaf-close-while-blocked-in-read LibPthread) -target_link_libraries(pthread-cond-timedwait-example LibPthread) diff --git a/Tests/LibThreading/CMakeLists.txt b/Tests/LibThreading/CMakeLists.txt index 355100fea2e..5f4914ab4fd 100644 --- a/Tests/LibThreading/CMakeLists.txt +++ b/Tests/LibThreading/CMakeLists.txt @@ -3,5 +3,5 @@ set(TEST_SOURCES ) foreach(source IN LISTS TEST_SOURCES) - serenity_test("${source}" LibThreading LIBS LibThreading LibPthread) + serenity_test("${source}" LibThreading LIBS LibThreading) endforeach() diff --git a/Userland/DevTools/UserspaceEmulator/CMakeLists.txt b/Userland/DevTools/UserspaceEmulator/CMakeLists.txt index 3f7ab6387b1..49e93aebca9 100644 --- a/Userland/DevTools/UserspaceEmulator/CMakeLists.txt +++ b/Userland/DevTools/UserspaceEmulator/CMakeLists.txt @@ -23,4 +23,4 @@ set(SOURCES add_compile_options(-mmmx -Wno-psabi -frounding-math) serenity_bin(UserspaceEmulator) -target_link_libraries(UserspaceEmulator LibX86 LibDebug LibCore LibPthread LibLine) +target_link_libraries(UserspaceEmulator LibX86 LibDebug LibCore LibLine) diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt index 916d76da37a..159d4ae41e4 100644 --- a/Userland/Libraries/LibC/CMakeLists.txt +++ b/Userland/Libraries/LibC/CMakeLists.txt @@ -180,7 +180,5 @@ target_link_libraries(LibC ssp system LibTimeZone) # We mark LibCStatic as a dependency of LibC because this triggers the build of the LibCStatic target add_dependencies(LibC LibM LibSystem LibCStatic) -# Provide a dummy target and a linker script for LibPthread that tells everything to link against LibC instead. -add_library(LibPthread INTERFACE) -target_link_libraries(LibPthread INTERFACE LibC) +# Provide a linker script instead of LibPthread that tells everything to link against LibC. file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libpthread.so" "INPUT(libc.so)") diff --git a/Userland/Libraries/LibThreading/CMakeLists.txt b/Userland/Libraries/LibThreading/CMakeLists.txt index db9fc4c6ff1..a02d6f66148 100644 --- a/Userland/Libraries/LibThreading/CMakeLists.txt +++ b/Userland/Libraries/LibThreading/CMakeLists.txt @@ -4,4 +4,4 @@ set(SOURCES ) serenity_lib(LibThreading threading) -target_link_libraries(LibThreading LibC LibCore LibPthread) +target_link_libraries(LibThreading LibC LibCore) diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index eb8d6de1a73..03e375b1d7f 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -228,7 +228,7 @@ target_link_libraries(traceroute LibMain) target_link_libraries(tree LibMain) target_link_libraries(true LibMain) target_link_libraries(truncate LibMain) -target_link_libraries(tt LibPthread LibMain) +target_link_libraries(tt LibMain) target_link_libraries(tty LibMain) target_link_libraries(umount LibMain) target_link_libraries(uname LibMain)