From 1b25c38b8be87c98ae8deb4765d9ee8310b383e7 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 6 Sep 2022 01:01:21 +0200 Subject: [PATCH] Everywhere: Fully remove the separate LibM directory --- CMakeLists.txt | 1 - Documentation/QtCreatorConfiguration.md | 1 - Documentation/VSCodeConfiguration.md | 2 -- Toolchain/BuildClang.sh | 4 ++-- Toolchain/BuildIt.sh | 4 +--- Userland/Libraries/CMakeLists.txt | 1 - Userland/Libraries/LibC/CMakeLists.txt | 5 +++++ Userland/Libraries/LibM/CMakeLists.txt | 4 ---- 8 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 Userland/Libraries/LibM/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 3700038766e..f54ea272306 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,6 @@ include_directories(.) include_directories(Userland/Libraries) include_directories(Userland/Libraries/LibC) include_directories(Userland/Libraries/LibCrypt) -include_directories(Userland/Libraries/LibM) include_directories(Userland/Libraries/LibSystem) include_directories(Userland/Services) include_directories(Userland) diff --git a/Documentation/QtCreatorConfiguration.md b/Documentation/QtCreatorConfiguration.md index ccfa745df93..ab4621c0deb 100644 --- a/Documentation/QtCreatorConfiguration.md +++ b/Documentation/QtCreatorConfiguration.md @@ -23,7 +23,6 @@ Userland/ Userland/Services/ Userland/Libraries/ Userland/Libraries/LibC/ -Userland/Libraries/LibM/ Userland/Libraries/LibSystem/ Toolchain/Local/i686/i686-pc-serenity/include/c++/12.1.0 Build/i686/ diff --git a/Documentation/VSCodeConfiguration.md b/Documentation/VSCodeConfiguration.md index efab75662d6..67fd9dc33dd 100644 --- a/Documentation/VSCodeConfiguration.md +++ b/Documentation/VSCodeConfiguration.md @@ -45,7 +45,6 @@ These extensions can be used as-is, but you need to point them to the custom Ser "${workspaceFolder}/Userland", "${workspaceFolder}/Userland/Libraries", "${workspaceFolder}/Userland/Libraries/LibC", - "${workspaceFolder}/Userland/Libraries/LibM", "${workspaceFolder}/Userland/Services", "${workspaceFolder}/Toolchain/Local/i686/i686-pc-serenity/include/c++/**" ], @@ -75,7 +74,6 @@ These extensions can be used as-is, but you need to point them to the custom Ser "${workspaceFolder}/Userland", "${workspaceFolder}/Userland/Libraries", "${workspaceFolder}/Userland/Libraries/LibC", - "${workspaceFolder}/Userland/Libraries/LibM", "${workspaceFolder}/Userland/Services", "${workspaceFolder}/Toolchain/Local/i686/i686-pc-serenity/include/c++/**" ], diff --git a/Toolchain/BuildClang.sh b/Toolchain/BuildClang.sh index bd6189f6197..c9a73382b03 100755 --- a/Toolchain/BuildClang.sh +++ b/Toolchain/BuildClang.sh @@ -248,14 +248,14 @@ popd # === COPY HEADERS === SRC_ROOT=$($REALPATH "$DIR"/..) -FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC "$SRC_ROOT"/Userland/Libraries/LibM -name '*.h' -print) +FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC -name '*.h' -print) for arch in $ARCHS; do mkdir -p "$BUILD/${arch}clang" pushd "$BUILD/${arch}clang" mkdir -p Root/usr/include/ for header in $FILES; do - target=$(echo "$header" | "$SED" -e "s@$SRC_ROOT/Userland/Libraries/LibC@@" -e "s@$SRC_ROOT/Userland/Libraries/LibM@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@") + target=$(echo "$header" | "$SED" -e "s@$SRC_ROOT/Userland/Libraries/LibC@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@") buildstep "system_headers" "$INSTALL" -D "$header" "Root/usr/include/$target" done popd diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 004de909ade..f4f6bde0739 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -363,7 +363,7 @@ pushd "$DIR/Build/$ARCH" buildstep "binutils/install" "$MAKE" install || exit 1 popd - echo "XXX serenity libc and libm headers" + echo "XXX serenity libc headers" mkdir -p "$BUILD" pushd "$BUILD" mkdir -p Root/usr/include/ @@ -373,13 +373,11 @@ pushd "$DIR/Build/$ARCH" "$SRC_ROOT"/Kernel/API \ "$SRC_ROOT"/Kernel/Arch \ "$SRC_ROOT"/Userland/Libraries/LibC \ - "$SRC_ROOT"/Userland/Libraries/LibM \ -name '*.h' -print) for header in $FILES; do target=$(echo "$header" | sed \ -e "s@$SRC_ROOT/AK/@AK/@" \ -e "s@$SRC_ROOT/Userland/Libraries/LibC@@" \ - -e "s@$SRC_ROOT/Userland/Libraries/LibM@@" \ -e "s@$SRC_ROOT/Kernel/@Kernel/@") buildstep "system_headers" $INSTALL -D "$header" "Root/usr/include/$target" done diff --git a/Userland/Libraries/CMakeLists.txt b/Userland/Libraries/CMakeLists.txt index df93ec91302..cc6f311315a 100644 --- a/Userland/Libraries/CMakeLists.txt +++ b/Userland/Libraries/CMakeLists.txt @@ -33,7 +33,6 @@ add_subdirectory(LibJS) add_subdirectory(LibKeyboard) add_subdirectory(LibLine) add_subdirectory(LibLocale) -add_subdirectory(LibM) add_subdirectory(LibMain) add_subdirectory(LibMarkdown) add_subdirectory(LibPartition) diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt index e171d3dd694..295964cbe22 100644 --- a/Userland/Libraries/LibC/CMakeLists.txt +++ b/Userland/Libraries/LibC/CMakeLists.txt @@ -184,3 +184,8 @@ add_dependencies(LibC LibM LibSystem LibCStatic) # Provide a linker script instead of various other libraries that tells everything to link against LibC. file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libpthread.so" "INPUT(libc.so)") file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libdl.so" "INPUT(libc.so)") + +# Provide a dummy target and a linker script for LibM that tells everything to link against LibC instead. +add_library(LibM INTERFACE) +target_link_libraries(LibM INTERFACE LibC) +file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libm.so" "INPUT(libc.so)") diff --git a/Userland/Libraries/LibM/CMakeLists.txt b/Userland/Libraries/LibM/CMakeLists.txt deleted file mode 100644 index e054251e144..00000000000 --- a/Userland/Libraries/LibM/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Provide a dummy target and a linker script that tells everything to link against LibC instead. -add_library(LibM INTERFACE) -target_link_libraries(LibM INTERFACE LibC) -file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libm.so" "INPUT(libc.so)")