From 1ca4fe0f0d767d09b3999b5558601905697e7990 Mon Sep 17 00:00:00 2001 From: Andress Barajas Date: Mon, 23 Jun 2025 17:40:31 -0700 Subject: [PATCH] Add GNU sed fallback for macOS to support GCC build --- scripts/006-gcc-stage2.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/006-gcc-stage2.sh b/scripts/006-gcc-stage2.sh index 7335708..c8028ec 100755 --- a/scripts/006-gcc-stage2.sh +++ b/scripts/006-gcc-stage2.sh @@ -42,11 +42,13 @@ OSVER=$(uname) if [ "$(uname -s)" = "Darwin" ]; then ## Check if using brew if command -v brew &> /dev/null; then + export PATH="$(brew --prefix gnu-sed)/libexec/gnubin:$PATH" TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpc=$(brew --prefix libmpc)" elif command -v port &> /dev/null; then ## Check if using MacPorts MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g) echo Macport base is $MACPORT_BASE + alias sed='gsed' TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE" fi fi