From c13775eb4058b89762d5226e754ae9c8d23bc542 Mon Sep 17 00:00:00 2001 From: Andress Barajas Date: Mon, 23 Jun 2025 10:27:37 -0700 Subject: [PATCH] Fix MacOS Clang 17+ compile issue --- scripts/001-binutils.sh | 6 +++--- scripts/002-gcc-stage1.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/001-binutils.sh b/scripts/001-binutils.sh index 8e607d3..d0d0003 100755 --- a/scripts/001-binutils.sh +++ b/scripts/001-binutils.sh @@ -37,17 +37,17 @@ TARGET_ALIAS="iop" TARG_XTRA_OPTS="" OSVER=$(uname) -## If using MacOS Apple, set gmp and mpfr paths using TARG_XTRA_OPTS +## If using MacOS Apple, set gmp and mpfr paths using TARG_XTRA_OPTS ## (this is needed for Apple Silicon but we will do it for all MacOS systems) if [ "$(uname -s)" = "Darwin" ]; then ## Check if using brew if command -v brew &> /dev/null; then - TARG_XTRA_OPTS="--with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr)" + TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr)" 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 - TARG_XTRA_OPTS="--with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE" + TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE" fi fi diff --git a/scripts/002-gcc-stage1.sh b/scripts/002-gcc-stage1.sh index 6c5b5c2..03cd006 100755 --- a/scripts/002-gcc-stage1.sh +++ b/scripts/002-gcc-stage1.sh @@ -38,17 +38,17 @@ TARG_XTRA_OPTS="" TARGET_CFLAGS="-O2 -gdwarf-2 -gz" OSVER=$(uname) -## If using MacOS Apple, set gmp, mpfr and mpc paths using TARG_XTRA_OPTS +## If using MacOS Apple, set gmp, mpfr and mpc paths using TARG_XTRA_OPTS ## (this is needed for Apple Silicon but we will do it for all MacOS systems) if [ "$(uname -s)" = "Darwin" ]; then ## Check if using brew if command -v brew &> /dev/null; then - TARG_XTRA_OPTS="--with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpc=$(brew --prefix libmpc)" + 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 - TARG_XTRA_OPTS="--with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE" + TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE" fi fi