diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-18 14:46:31 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-04-18 15:51:56 +0200 |
commit | c60f02fbc286ed9384ace2caf8ca71610d97502a (patch) | |
tree | 40fcab185c1065269f2097a65624a78529d891fa /Toolchain | |
parent | 07adbf19c4325f9b9ca768eaf6740342e07c9f98 (diff) | |
download | serenity-c60f02fbc286ed9384ace2caf8ca71610d97502a.zip |
Toolchain: Build fix for macOS
Unfortunately their sed behaves a tiny bit different to how
GNU sed does.
Diffstat (limited to 'Toolchain')
-rwxr-xr-x | Toolchain/BuildIt.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index d1ae540a47..c3d532f2b4 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -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" \ |