1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

Toolchain+Ports: Split the GCC patches

This shouldn't cause any breaking changes, so a toolchain rebuild is not
required.

As per Hendiadyoin's request, math errno is disabled by default, which
should enable some extra compiler optimizations in LibGL and LibSoftGPU
code that uses math functions heavily.

Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
This commit is contained in:
Daniel Bertalan 2022-05-17 09:52:17 +04:30 committed by Ali Mohammad Pur
parent 83aa5dcbf6
commit d0edf2627c
15 changed files with 538 additions and 347 deletions

View file

@ -271,11 +271,13 @@ pushd "$DIR/Tarballs"
git init > /dev/null
git add . > /dev/null
git commit -am "BASE" > /dev/null
git apply "$DIR"/Patches/gcc.patch > /dev/null
git am --keep-non-patch "$DIR"/Patches/gcc/*.patch > /dev/null
else
patch -p1 < "$DIR/Patches/gcc.patch" > /dev/null
for patch in "$DIR"/Patches/gcc/*.patch; do
patch -p1 < "$patch" > /dev/null
done
fi
$MD5SUM "$DIR/Patches/gcc.patch" > .patch.applied
$MD5SUM $DIR/Patches/gcc/*.patch > .patch.applied
popd
if [ "$SYSTEM_NAME" = "Darwin" ]; then
@ -392,10 +394,6 @@ pushd "$DIR/Build/$ARCH"
perl -pi -e 's/-no-pie/-nopie/g' "$DIR/Tarballs/gcc-$GCC_VERSION/gcc/configure"
fi
if [ ! -f "$DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity-userland.h" ]; then
cp "$DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity.h" "$DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity-kernel.h"
fi
rm -rf gcc
mkdir -p gcc