-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgcc.sh
executable file
·28 lines (19 loc) · 969 Bytes
/
gcc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Build using extant GCC.
script_loc=`cd $(dirname $0) && pwd -P`
. $script_loc/common.sh
XCODE=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk
CLT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
BUGURL=https://github.com/simonjwright/building-gcc-macos-native
echo "BUILDING THE COMPILER IN $PREFIX"
set -eu
rm -rf *
$GCC_SRC/configure \
--prefix=$PREFIX \
--enable-languages=c,c++,ada \
--build=$BUILD \
--with-sysroot=$SDKROOT/../MacOSX14.sdk \
--with-specs="%{!-sysroot:--sysroot=%:if-exists-else($XCODE $CLT)}" \
--with-bugurl=$BUGURL \
--$BOOTSTRAP-bootstrap
make -w -j$CORES
make -w -j$CORES install