1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

LibC+LibELF: Move ELF definitions from LibC to LibELF

This is needed to avoid including LibC headers in Lagom builds.
Unfortunately, we cannot rely on the build machine to provide a
fully POSIX-compatible ELF header for Lagom builds, so we have to
use our own.
This commit is contained in:
implicitfield 2023-04-30 19:07:21 +04:00 committed by Andreas Kling
parent 7d19abda7a
commit 79adeb626b
16 changed files with 850 additions and 836 deletions

View file

@ -250,6 +250,7 @@ SRC_ROOT=$($REALPATH "$DIR"/..)
FILES=$(find \
"$SRC_ROOT"/Kernel/API \
"$SRC_ROOT"/Userland/Libraries/LibC \
"$SRC_ROOT"/Userland/Libraries/LibELF/ELFABI.h \
"$SRC_ROOT"/Userland/Libraries/LibRegex/RegexDefs.h \
-name '*.h' -print)
for arch in $ARCHS; do
@ -260,6 +261,7 @@ for arch in $ARCHS; do
target=$(echo "$header" | "$SED" \
-e "s|$SRC_ROOT/Userland/Libraries/LibC||" \
-e "s|$SRC_ROOT/Kernel/|Kernel/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibELF/|LibELF/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibRegex/|LibRegex/|")
buildstep "system_headers" "$INSTALL" -D "$header" "Root/usr/include/$target"
done