@@ -37,17 +37,17 @@ TARG_XTRA_OPTS=""
3737TARGET_CFLAGS=" -O2 -gdwarf-2 -gz"
3838OSVER=$( uname)
3939
40- # Workaround to build with newer mingw-w64 https://github.com/msys2/MINGW-packages/commit/4360ed1a7470728be1dba0687df764604f1992d9
41- if [ " ${OSVER : 0 : 10} " == MINGW64_NT ] ; then
42- export lt_cv_sys_max_cmd_len=8000
43- export CC=x86_64-w64-mingw32-gcc
44- TARG_XTRA_OPTS= " --host=x86_64-w64-mingw32 "
45- export CPPFLAGS =" -DWIN32_LEAN_AND_MEAN -DCOM_NO_WINDOWS_H "
46- elif [ " ${OSVER : 0 : 10} " == MINGW32_NT ] ; then
47- export lt_cv_sys_max_cmd_len=8000
48- export CC=i686-w64-mingw32-gcc
49- TARG_XTRA_OPTS=" --host=i686-w64-mingw32 "
50- export CPPFLAGS= " -DWIN32_LEAN_AND_MEAN -DCOM_NO_WINDOWS_H "
40+ # # If using MacOS Apple, set gmp, mpfr and mpc paths using TARG_XTRA_OPTS
41+ # # (this is needed for Apple Silicon but we will do it for all MacOS systems)
42+ if [ " $( uname -s ) " = " Darwin " ] ; then
43+ # # Check if using brew
44+ if command -v brew & > /dev/null ; then
45+ TARG_XTRA_OPTS =" --with-gmp= $( brew --prefix gmp ) --with-mpfr= $( brew --prefix mpfr ) --with-mpc= $( brew --prefix libmpc ) "
46+ fi
47+ # # Check if using MacPorts
48+ if command -v port & > /dev/null ; then
49+ TARG_XTRA_OPTS=" --with-gmp= $( port -q prefix gmp ) --with-mpfr= $( port -q prefix mpfr ) --with-mpc= $( port -q prefix libmpc ) "
50+ fi
5151fi
5252
5353# # Determine the maximum number of processes that Make can work with.
@@ -90,13 +90,12 @@ for TARGET in "mipsel-ps2-irx" "mipsel-none-elf"; do
9090 --disable-nls \
9191 --disable-tls \
9292 --disable-libstdcxx \
93- MAKEINFO=missing \
9493 $TARG_XTRA_OPTS
9594
9695 # # Compile and install.
97- make --quiet -j " $PROC_NR " MAKEINFO=missing all
98- make --quiet -j " $PROC_NR " MAKEINFO=missing install-strip
99- make --quiet -j " $PROC_NR " MAKEINFO=missing clean
96+ make --quiet -j " $PROC_NR " all
97+ make --quiet -j " $PROC_NR " install-strip
98+ make --quiet -j " $PROC_NR " clean
10099
101100 # # Exit the build directory.
102101 cd ..
0 commit comments