-
Notifications
You must be signed in to change notification settings - Fork 16
/
configure-gcc.sh
executable file
·108 lines (98 loc) · 3.56 KB
/
configure-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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
##
## Script: configure-gcc.sh
##
## This second-level script configures GCC, and anything else that is
## needed to build it.
##
##- Make sure we're in the same directory as this script.
##
export TOP_DIR="$(cd "$(dirname "$0")" && pwd)"
cd $TOP_DIR
##- Get the GCC-related variables for this build.
##
source ./gcc-build-vars.sh
##- Run the GCC configure script using our customizations.
##
cd $GCC_BLD_DIR
echo -n "Checking for configuration log in $GCC_BLD_DIR..."
if [ ! -e config.log ]
then
echo ""
echo "Running configure from $GCC_SRC_DIR... "
if [ "$GCC_PLATFORM" == "FreeBSD" ]
then
$GCC_SRC_DIR/configure -v \
--with-pkgversion="$GCC_PKG_NAME" \
--prefix=$GCC_INSTALL_PREFIX \
--program-suffix=$GCC_EXE_SUFFIX \
--enable-tls \
--enable-shared \
--enable-threads=posix \
--enable-languages=c,c++ \
--enable-lto \
--enable-bootstrap \
--disable-nls \
--disable-multilib \
--disable-install-libiberty \
--with-system-zlib \
--with-gmp=/usr/local \
--with-mpfr=/usr/local \
--with-mpc=/usr/local
elif [ "$GCC_PLATFORM" == "Linux" ]
then
$GCC_SRC_DIR/configure -v \
--with-pkgversion="$GCC_PKG_NAME" \
--prefix=$GCC_INSTALL_PREFIX \
--program-suffix=$GCC_EXE_SUFFIX \
--enable-bootstrap \
--enable-__cxa_atexit \
--enable-cet \
--enable-clocale=gnu \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-initfini-array \
--enable-languages=c,c++ \
--enable-linker-build-id \
--enable-lto \
--enable-offload-targets=nvptx-none \
--enable-plugin \
--enable-shared \
--enable-threads=posix \
--enable-tls \
--disable-install-libiberty \
--disable-libmpx \
--disable-libunwind-exceptions \
--disable-multilib \
--disable-nls \
--disable-werror \
$GCC_PBS_CONFIG_OPTION \
--with-linker-hash-style=gnu \
--with-system-zlib \
--with-tune=generic \
--without-cuda-driver
fi
echo "GCC configuration completed!"
echo ""
else
echo " found"
echo "GCC configure has already been run"
fi
##- Run the binutils configure script.
##
if [ "$GCC_PLATFORM" == "Linux" ] && [ "$GCC_USE_CUSTOM_BINUTILS" == "YES" ]
then
cd $BU_BLD_DIR
echo -n "Checking for configuration log in $BU_BLD_DIR..."
if [ ! -e config.log ]
then
echo ""
echo "Running configure from $BU_SRC_DIR... "
$BU_SRC_DIR/configure -v
echo "binutils configuration completed!"
echo ""
else
echo " found"
echo "Configure has already been run for binutils"
fi
fi