/
BUILD
62 lines (51 loc) · 1.95 KB
/
BUILD
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
# using -pipe causes spurious test-suite failures
bad_flags -pipe &&
mkdir BUILD &&
cd BUILD &&
LANGUAGES="${LANGUAGES:=c++}" &&
OPTS+=" --build=$BUILD \
--host=$BUILD \
--prefix=/usr \
--libdir=/usr/lib \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--enable-languages=$LANGUAGES \
--enable-gnu-unique-object \
--enable-ckecking=release \
--enable-target-optspace \
--enable-linker-build-id \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-shared \
--enable-libmpx \
--enable-plugin \
--enable-lto \
--with-gnu-ld \
--with-system-zlib \
--disable-nls \
--disable-werror \
--disable-libssp \
--disable-multilib \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions"
../configure $OPTS &&
make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap-lean &&
prepare_install &&
make install &&
( cd /usr/libexec/gcc/`arch`-pc-linux-gnu/$VERSION &&
strip cc1 cc1plus lto1 ) &&
# Make the package archive a lot smaller
#(
# cd /usr/lib/gcc/`arch`-pc-linux-gnu/$VERSION &&
# strip cc1 cc1plus lto1
#) &&
install -d /usr/share/gdb/auto-load &&
mv /usr/lib/libstdc++.so.6.*-gdb.py /usr/share/gdb/auto-load/ &&
ln -sf /usr/bin/cpp /usr/lib/gcc/$BUILD/$VERSION/cpp &&
ln -sf gcc /usr/bin/cc &&
# POSIX conformance launcher scripts for c89 and c99
install -m0755 {${SCRIPT_DIRECTORY},/usr/bin}/c89 &&
install -m0755 {${SCRIPT_DIRECTORY},/usr/bin}/c99 &&
# remove the offending broken freetype link
rm -f /usr/lib/gcc/$BUILD/$VERSION/include-fixed/freetype