2019-06-17 08:27:17 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
# Build must happen outside of gcc source.
|
2019-06-17 11:50:37 -06:00
|
|
|
mkdir -p gcc-build
|
2019-06-21 05:25:22 -06:00
|
|
|
cd gcc-build
|
2019-06-17 08:27:17 -06:00
|
|
|
|
|
|
|
export libat_cv_have_ifunc=no
|
|
|
|
|
2019-07-12 01:22:13 -06:00
|
|
|
# Unset CFLAGS/CXXFLAGS to make 'gcc' build as generic.
|
|
|
|
unset CFLAGS CXXFLAGS
|
2019-07-13 02:57:51 -06:00
|
|
|
export CFLAGS=-pipe
|
2019-07-12 01:22:13 -06:00
|
|
|
|
2019-07-13 02:57:51 -06:00
|
|
|
../gcc/configure \
|
2019-06-17 11:46:58 -06:00
|
|
|
--prefix=/usr \
|
2019-07-12 01:22:13 -06:00
|
|
|
--disable-bootstrap \
|
2019-07-13 01:23:32 -06:00
|
|
|
--disable-multilib \
|
2019-06-17 11:46:58 -06:00
|
|
|
--disable-symvers \
|
|
|
|
--disable-libmpx \
|
|
|
|
--disable-libmudflap \
|
|
|
|
--disable-libsanitizer \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-werror \
|
|
|
|
--disable-fixed-point \
|
|
|
|
--disable-libstdcxx-pch \
|
|
|
|
--enable-checking=release \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--with-system-zlib \
|
|
|
|
--enable-__cxa_atexit \
|
|
|
|
--enable-default-pie \
|
|
|
|
--enable-default-ssp \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-threads \
|
|
|
|
--enable-tls \
|
2019-07-13 01:14:38 -06:00
|
|
|
--enable-languages=c,c++
|
2019-06-17 08:27:17 -06:00
|
|
|
|
2019-07-13 01:14:38 -06:00
|
|
|
make
|
2019-06-17 08:27:17 -06:00
|
|
|
make DESTDIR="$1" install
|
2019-06-18 12:00:16 -06:00
|
|
|
|
2019-07-12 01:22:13 -06:00
|
|
|
# Save 35MB.
|
|
|
|
find "$1" -name libgtkpeer.a -delete
|
|
|
|
find "$1" -name libgjsmalsa.a -delete
|
|
|
|
find "$1" -name libgij.a -delete
|
|
|
|
|
2019-06-18 12:00:16 -06:00
|
|
|
# Remove all info files.
|
|
|
|
rm -rf "$1/usr/share/info"
|
2019-06-18 22:43:03 -06:00
|
|
|
|
|
|
|
# Some legacy programs will expect cc
|
2019-06-18 22:53:01 -06:00
|
|
|
ln -s gcc "$1/usr/bin/cc"
|
2019-06-28 09:04:37 -06:00
|
|
|
|
|
|
|
# POSIX compliance.
|
|
|
|
install -Dm755 ../c99 "$1/usr/bin/c99"
|