1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

Toolchain: Backport support for the mold linker

The `-fuse-ld=mold` flag was only added in the not-yet-released GCC 12.

Cherry-picked from the following upstream commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ad964f7eaef9c03ce68a01cfdd7fde9d56524868
This commit is contained in:
Daniel Bertalan 2022-01-19 19:26:09 +01:00 committed by Brian Gianforcaro
parent bd3ed700f2
commit ad649c48da
3 changed files with 261 additions and 1 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 am "$DIR"/Patches/gcc-support-mold-linker.patch > /dev/null
git apply "$DIR"/Patches/gcc.patch > /dev/null
else
patch -p1 < "$DIR/Patches/gcc-support-mold-linker.patch" > /dev/null
patch -p1 < "$DIR/Patches/gcc.patch" > /dev/null
fi
$MD5SUM "$DIR/Patches/gcc.patch" > .patch.applied
$MD5SUM "$DIR/Patches/gcc.patch" "$DIR/Patches/gcc-support-mold-linker.patch" > .patch.applied
popd
if [ "$SYSTEM_NAME" = "Darwin" ]; then