mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +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:
parent
7d19abda7a
commit
79adeb626b
16 changed files with 850 additions and 836 deletions
|
@ -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
|
||||
|
|
|
@ -270,6 +270,7 @@ pushd "$DIR/Build/$ARCH"
|
|||
"$SRC_ROOT"/Kernel/API \
|
||||
"$SRC_ROOT"/Kernel/Arch \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibC \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibELF/ELFABI.h \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibRegex/RegexDefs.h \
|
||||
-name '*.h' -print)
|
||||
for header in $FILES; do
|
||||
|
@ -277,6 +278,7 @@ pushd "$DIR/Build/$ARCH"
|
|||
-e "s|$SRC_ROOT/AK/|AK/|" \
|
||||
-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" mkdir -p "$(dirname "Root/usr/include/$target")"
|
||||
buildstep "system_headers" $INSTALL "$header" "Root/usr/include/$target"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue