mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
Toolchain: Install system headers before building GCC
GCC determines whether the system's <limits.h> header is usable and installs a different version of its own <limits.h> header depending on whether the system header file exists. If the system header is missing GCC's <limits.h> header does not include the system header via #include_next. For this to work we need to install LibC's headers before attempting to build GCC. Also, re-running BuildIt.sh "hides" this problem because at that point the sysroot directory also already has a <limits.h> header file from the previous build.
This commit is contained in:
parent
3f4e90f32b
commit
e95cb252be
|
@ -239,15 +239,6 @@ pushd "$DIR/Build/$ARCH"
|
|||
--enable-lto \
|
||||
${TRY_USE_LOCAL_TOOLCHAIN:+"--quiet"} || exit 1
|
||||
|
||||
echo "XXX build gcc and libgcc"
|
||||
"$MAKE" -j "$MAKEJOBS" all-gcc || exit 1
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
ln -sf liblto_plugin.so.0.0 gcc/liblto_plugin.so
|
||||
fi
|
||||
"$MAKE" -j "$MAKEJOBS" all-target-libgcc || exit 1
|
||||
echo "XXX install gcc and libgcc"
|
||||
"$MAKE" install-gcc install-target-libgcc || exit 1
|
||||
|
||||
echo "XXX serenity libc and libm headers"
|
||||
mkdir -p "$BUILD"
|
||||
pushd "$BUILD"
|
||||
|
@ -261,6 +252,15 @@ pushd "$DIR/Build/$ARCH"
|
|||
unset SRC_ROOT
|
||||
popd
|
||||
|
||||
echo "XXX build gcc and libgcc"
|
||||
"$MAKE" -j "$MAKEJOBS" all-gcc || exit 1
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
ln -sf liblto_plugin.so.0.0 gcc/liblto_plugin.so
|
||||
fi
|
||||
"$MAKE" -j "$MAKEJOBS" all-target-libgcc || exit 1
|
||||
echo "XXX install gcc and libgcc"
|
||||
"$MAKE" install-gcc install-target-libgcc || exit 1
|
||||
|
||||
echo "XXX build libstdc++"
|
||||
"$MAKE" -j "$MAKEJOBS" all-target-libstdc++-v3 || exit 1
|
||||
echo "XXX install libstdc++"
|
||||
|
|
Loading…
Reference in a new issue