Toolchain: Build fix for macOS

Unfortunately their sed behaves a tiny bit different to how
GNU sed does.
This commit is contained in:
Gunnar Beutner 2021-04-18 14:46:31 +02:00 committed by Linus Groh
parent 07adbf19c4
commit c60f02fbc2
Notes: sideshowbarker 2024-07-18 19:27:33 +09:00

View file

@ -78,7 +78,11 @@ GCC_BASE_URL="http://ftp.gnu.org/gnu/gcc"
buildstep() {
NAME=$1
shift
"$@" 2>&1 | sed 's|^|\x1b[34m['"${NAME}"']\x1b[39m |'
if [ "$(uname -s)" = "Darwin" ]; then
"$@" 2>&1 | sed 's|^|['"${NAME}"'] |'
else
"$@" 2>&1 | sed 's|^|\x1b[34m['"${NAME}"']\x1b[39m |'
fi
}
# === CHECK CACHE AND REUSE ===
@ -269,7 +273,7 @@ pushd "$DIR/Build/$ARCH"
cp $DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity-kernel.h $DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity.h
if [ "$STAGE" = "Userland" ]; then
sed -i 's@-fno-exceptions @@' $DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity.h
sed -i='' 's@-fno-exceptions @@' $DIR/Tarballs/gcc-$GCC_VERSION/gcc/config/serenity.h
fi
buildstep "gcc/configure/${STAGE,,}" "$DIR/Tarballs/gcc-$GCC_VERSION/configure" --prefix="$PREFIX" \