2019-06-17 14:27:17 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
# Build must happen outside of gcc source.
|
2019-06-17 17:50:37 +00:00
|
|
|
mkdir -p gcc-build
|
2019-06-21 11:25:22 +00:00
|
|
|
cd gcc-build
|
2019-06-17 14:27:17 +00:00
|
|
|
|
|
|
|
export libat_cv_have_ifunc=no
|
2019-06-22 06:29:12 +00:00
|
|
|
machine=$(gcc -dumpmachine)
|
2019-06-17 14:27:17 +00:00
|
|
|
|
2019-06-17 17:46:58 +00:00
|
|
|
../gcc/configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--disable-multilib \
|
|
|
|
--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-06-22 06:29:12 +00:00
|
|
|
--enable-languages=c,c++ \
|
|
|
|
--build="$machine" \
|
|
|
|
--target="$machine" \
|
|
|
|
--host="$machine"
|
2019-06-17 14:27:17 +00:00
|
|
|
|
|
|
|
make BOOT_CFLAGS='-O'
|
|
|
|
make DESTDIR="$1" install
|
2019-06-18 18:00:16 +00:00
|
|
|
|
|
|
|
# Remove all info files.
|
|
|
|
rm -rf "$1/usr/share/info"
|
2019-06-19 04:43:03 +00:00
|
|
|
|
|
|
|
# Some legacy programs will expect cc
|
2019-06-19 04:53:01 +00:00
|
|
|
ln -s gcc "$1/usr/bin/cc"
|