From 670cd575f79fd2c56ce4ad3e661fc499dd44177f Mon Sep 17 00:00:00 2001 From: "Alex V. Nesta, PhD" Date: Fri, 12 Jan 2024 18:01:40 -0500 Subject: [PATCH] Update build-toolchain.sh for mac os (#483) Fixes #461 Updates #460 --- tools/build-toolchain.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/build-toolchain.sh b/tools/build-toolchain.sh index cd1a8bfd24..aef13f0d0d 100755 --- a/tools/build-toolchain.sh +++ b/tools/build-toolchain.sh @@ -69,7 +69,7 @@ if [[ $OSTYPE == 'darwin'* ]]; then # Install required dependencies. gsed is really required, the others are optionals # and just speed up build. - brew install -q gmp mpfr libmpc gsed + brew install -q gmp mpfr libmpc gsed gcc isl libpng lz4 make mpc texinfo zlib # FIXME: we could avoid download/symlink GMP and friends for a cross-compiler # but we need to symlink them for the canadian compiler. @@ -82,14 +82,17 @@ if [[ $OSTYPE == 'darwin'* ]]; then "--with-gmp=$(brew --prefix)" "--with-mpfr=$(brew --prefix)" "--with-mpc=$(brew --prefix)" + "--with-zlib=$(brew --prefix)" ) # Install GNU sed as default sed in PATH. GCC compilation fails otherwise, # because it does not work with BSD sed. PATH="$(brew --prefix gsed)/libexec/gnubin:$PATH" export PATH +else + # Configure GCC arguments for non-macOS platforms + GCC_CONFIGURE_ARGS+=("--with-system-zlib") fi - # Create build path and enter it mkdir -p "$BUILD_PATH" cd "$BUILD_PATH" @@ -211,8 +214,7 @@ pushd gcc_compile_target --disable-threads \ --disable-win32-registry \ --disable-nls \ - --disable-werror \ - --with-system-zlib + --disable-werror make all-gcc -j "$JOBS" make install-gcc || sudo make install-gcc || su -c "make install-gcc" make all-target-libgcc -j "$JOBS"