forked from MoSync/gcc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.sh
executable file
·52 lines (41 loc) · 2.19 KB
/
configure.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#---------------------------------------------------------------------------------
# Source and Install directories
#---------------------------------------------------------------------------------
SRCDIR=../../gcc-3.4.6 # the sourcecode dir for gcc
# This must be specified in the format shown here
# as one of the tools built during the process will fail
# if absolute paths are specified
# the example here assumes that the gcc source directory
# is at the same level as the script
prefix=/src/mapip/gcc # installation directory
# This must be specified in the format shown here
# or gcc won't be able to find it's libraries and includes
# if you move the installation
#---------------------------------------------------------------------------------
# set the path for the installed binutils
#---------------------------------------------------------------------------------
#export PATH=${PATH}:/c/cross-gcc/mosync/bin
#---------------------------------------------------------------------------------
# set the target and compiler flags
#---------------------------------------------------------------------------------
target=mapip
host=mingw32
progpref=mapip-
export CFLAGS='-O2 -pipe'
export CXXFLAGS='-O2 -pipe'
export LDFLAGS='-s'
export DEBUG_FLAGS=''
#---------------------------------------------------------------------------------
# build and install just the c compiler
#---------------------------------------------------------------------------------
mkdir -p $prefix
cd $prefix
$SRCDIR/configure \
--enable-languages=c,c++ \
--with-gcc --with-stabs \
--disable-shared --disable-threads --disable-win32-registry --disable-nls\
--target=$target \
--host=$host \
--without-headers \
--program-prefix=$progpref -v\
2>&1 | tee gcc_configure.log