repo/gcc/build

53 lines
1.4 KiB
Text
Raw Permalink Normal View History

2021-08-28 11:05:07 +03:00
curl -# https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz -o gmp-6.2.1.tar.xz
2021-07-17 02:25:34 +03:00
tar -xf gmp-6.2.1.tar.xz gmp
2021-08-28 11:05:07 +03:00
curl -# wget https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz -o mpfr-4.1.0.tar.xz
2021-07-17 02:25:34 +03:00
tar -xf mprf-4.1.0.tar.xz mpfr
2021-08-28 11:05:07 +03:00
curl -# https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz -o mpc-1.2.1.tar.gz
2021-07-17 02:25:34 +03:00
tar -xf mpc-1.2.1.tar.gz mpc
2021-07-14 16:50:13 +03:00
# Use lib not lib64 by default.
sed '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64 > _
mv -f _ gcc/gcc/config/i386/t-linux64
sed 's/lib64/lib/' gcc/gcc/config/i386/linux64.h > _
mv -f _ gcc/gcc/config/i386/linux64.h
2021-07-04 19:08:09 +03:00
mkdir build
cd build
2021-07-14 16:50:13 +03:00
../configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-multilib \
--disable-symvers \
--disable-libmpx \
--disable-libmudflap \
--disable-libsanitizer \
--disable-werror \
--disable-fixed-point \
--disable-libstdcxx-pch \
--disable-nls \
--enable-checking=release \
--enable-__cxa_atexit \
--enable-default-pie \
--enable-default-ssp \
--enable-shared \
--enable-threads \
--enable-tls \
--enable-languages=c,c++
2021-07-08 20:49:15 +03:00
make
2021-07-14 15:59:20 +03:00
make DESTDIR="$1" install
2021-07-14 16:50:13 +03:00
# Save 35MB. (from KISS)
find "$1" -name libgtkpeer.a -exec rm -f {} +
find "$1" -name libgjsmalsa.a -exec rm -f {} +
find "$1" -name libgij.a -exec rm -f {} +
ln -sf gcc "$1/usr/bin/cc"
2021-07-14 16:51:39 +03:00
echo "#!/bin/sh" > "$1"/usr/bin/c99
echo "exec cc -std=c99 "$@"" >> "$1"/usr/bin/c99
chmod +x "$1"/usr/bin/c99