forked from kiss-community/repo
57 lines
1.2 KiB
Bash
Executable File
57 lines
1.2 KiB
Bash
Executable File
#!/bin/sh -e
|
|
|
|
# Build must happen outside of gcc source.
|
|
mkdir -p gcc-build
|
|
cd gcc-build
|
|
|
|
export libat_cv_have_ifunc=no
|
|
machine=$(gcc -dumpmachine)
|
|
|
|
# Unset CFLAGS/CXXFLAGS to make 'gcc' build as generic.
|
|
unset CFLAGS CXXFLAGS
|
|
|
|
../gcc/configure \
|
|
--prefix=/usr \
|
|
--disable-bootstrap \
|
|
--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 \
|
|
--enable-languages=c,c++ \
|
|
--build="$machine" \
|
|
--with-tune=generic \
|
|
--with-arch=x86-64 \
|
|
--with-cpu-64=generic
|
|
|
|
make BOOT_CFLAGS='-O'
|
|
make DESTDIR="$1" install
|
|
|
|
# Save 35MB.
|
|
find "$1" -name libgtkpeer.a -delete
|
|
find "$1" -name libgjsmalsa.a -delete
|
|
find "$1" -name libgij.a -delete
|
|
|
|
# Remove all info files.
|
|
rm -rf "$1/usr/share/info"
|
|
|
|
# Some legacy programs will expect cc
|
|
ln -s gcc "$1/usr/bin/cc"
|
|
|
|
# POSIX compliance.
|
|
install -Dm755 ../c99 "$1/usr/bin/c99"
|