-
Notifications
You must be signed in to change notification settings - Fork 2
/
05_gcc_post
executable file
·68 lines (60 loc) · 1.21 KB
/
05_gcc_post
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
64
65
66
67
68
#!/bin/bash
#
# 05_gcc_post
#
# Rob Laswick
# May 2 2013
#
# Script to configure, build, and install 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
PATH=${PREFIX}/bin:$PATH
cd ${PREFIX}
mkdir -p usr/include
cd ${WORKING_DIR}/build/gcc
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 \
--disable-libmudflap \
--disable-libgomp \
--disable-libquadmath \
--with-headers=../../newlib/newlib/libc/include \
--with-sysroot=${PREFIX} \
--enable-lto \
--disable-libitm \
--with-pkgversion="laswick.net `date +"%04Y-%m-%d"`" || exit 1
make -j${NUM_CORES} || exit 1
make install || exit 1
echo
echo
echo
echo gcc built and installed successfully!
echo