diff --git a/scripts/001-binutils.sh b/scripts/001-binutils.sh index a6b4b54..379078a 100755 --- a/scripts/001-binutils.sh +++ b/scripts/001-binutils.sh @@ -36,15 +36,15 @@ TARGET_ALIAS="ee" 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 - TARG_XTRA_OPTS="--with-gmp=$(port -q prefix gmp) --with-mpfr=$(port -q prefix mpfr)" + ## Check if using MacPorts + TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(port -q prefix gmp) --with-mpfr=$(port -q prefix mpfr)" fi fi diff --git a/scripts/002-gcc-stage1.sh b/scripts/002-gcc-stage1.sh index 1ac5b85..46289fd 100755 --- a/scripts/002-gcc-stage1.sh +++ b/scripts/002-gcc-stage1.sh @@ -37,17 +37,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 diff --git a/scripts/006-gcc-stage2.sh b/scripts/006-gcc-stage2.sh index 3950e26..7335708 100755 --- a/scripts/006-gcc-stage2.sh +++ b/scripts/006-gcc-stage2.sh @@ -37,17 +37,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