Everywhere: Fully remove the separate LibDl directory

This commit is contained in:
Tim Schumacher 2022-08-14 12:39:51 +02:00 committed by Linus Groh
parent 226608a48f
commit 8778bb3473
5 changed files with 8 additions and 10 deletions

View file

@ -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 "$SRC_ROOT"/Userland/Libraries/LibDl -name '*.h' -print)
FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC "$SRC_ROOT"/Userland/Libraries/LibM -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/Userland/Libraries/LibDl@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@")
target=$(echo "$header" | "$SED" -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
popd

View file

@ -363,7 +363,7 @@ pushd "$DIR/Build/$ARCH"
buildstep "binutils/install" "$MAKE" install || exit 1
popd
echo "XXX serenity libc, libdl and libm headers"
echo "XXX serenity libc and libm headers"
mkdir -p "$BUILD"
pushd "$BUILD"
mkdir -p Root/usr/include/
@ -373,14 +373,12 @@ pushd "$DIR/Build/$ARCH"
"$SRC_ROOT"/Kernel/API \
"$SRC_ROOT"/Kernel/Arch \
"$SRC_ROOT"/Userland/Libraries/LibC \
"$SRC_ROOT"/Userland/Libraries/LibDl \
"$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/LibDl@@" \
-e "s@$SRC_ROOT/Userland/Libraries/LibM@@" \
-e "s@$SRC_ROOT/Kernel/@Kernel/@")
buildstep "system_headers" $INSTALL -D "$header" "Root/usr/include/$target"

View file

@ -15,7 +15,6 @@ add_subdirectory(LibDebug)
add_subdirectory(LibDesktop)
add_subdirectory(LibDeviceTree)
add_subdirectory(LibDiff)
add_subdirectory(LibDl)
add_subdirectory(LibDNS)
add_subdirectory(LibDSP)
add_subdirectory(LibEDID)

View file

@ -182,3 +182,8 @@ add_dependencies(LibC LibM LibSystem LibCStatic)
# 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)")
# Provide a dummy target and a linker script for LibDl that tells everything to link against LibC instead.
add_library(LibDl INTERFACE)
target_link_libraries(LibDl INTERFACE LibC)
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libdl.so" "INPUT(libc.so)")

View file

@ -1,4 +0,0 @@
# Provide a dummy target and a linker script that tells everything to link against LibC instead.
add_library(LibDl INTERFACE)
target_link_libraries(LibDl INTERFACE LibC)
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libdl.so" "INPUT(libc.so)")