-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path03_gcc_pre
executable file
·63 lines (56 loc) · 1.12 KB
/
03_gcc_pre
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
#
# 03_gcc_pre
#
# Rob Laswick
# May 2 2013
#
# Script to configure, build, and install the bootstrapped version of gcc.
if [ $# -ne 3 ]; then
echo
echo
echo *** RUNNING SCRIPT STAND ALONE ***
echo
echo
WORKING_DIR=/home/rlaswick/engineering/arm-toolchain-build
PREFIX=/home/rlaswick/opt/arm-toolchain
NUM_CORES=1
else
WORKING_DIR=$1
PREFIX=$2
NUM_CORES=$3
fi
cd ${WORKING_DIR}/build/gcc
./contrib/download_prerequisites
rm -rf build
mkdir build
cd build
../configure \
--target=arm-none-eabi \
--prefix=${PREFIX} \
--enable-interwork \
--enable-multilib \
--disable-nls \
--disable-libssp \
--with-gcc \
--with-gnu-as \
--with-gnu-ld \
--with-system-zlib \
--with-newlib \
--enable-languages="c" \
--disable-shared \
--disable-threads \
--disable-newlib-suplied-syscalls \
--without-headers \
--disable-libmudflap \
--disable-libgomp \
--disable-libquadmath \
--disable-libitm \
--enable-lto || exit 1
make -j${NUM_CORES} all-gcc || exit 1
make install-gcc || exit 1
echo
echo
echo
echo bootstrapped gcc built and installed successfully!
echo