repo/gcc/build

28 lines
789 B
Text
Raw Normal View History

2021-07-07 17:27:54 +03:00
wget -O gcc-11.1.0.tar.gz https://gcc.gnu.org/pub/gcc/releases/gcc-11.1.0/gcc-11.1.0.tar.xz
tar -xf gcc-11.1.0.tar.gz
cd gcc-11.1.0
wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
wget https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz
wget https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz
tar -xf gmp-6.2.1.tar.xz
tar -xf mpfr-4.1.0.tar.xz
tar -xf mpc-1.2.1.tar.gz
2021-07-10 13:57:41 +03:00
mv gmp-6.2.1 gmp
mv mpfr-4.1.0 mpfr
mv mpc-1.2.1 mpc
2021-07-10 13:57:41 +03:00
sed -i '/m64=/s/lib64/lib/' ./config/i386/t-linux64
sed -i 's/lib64/lib/' ./config/i386/linux64.h
2021-07-04 19:08:09 +03:00
mkdir build
cd build
2021-07-04 19:08:09 +03:00
../configure --prefix=/usr --enable-languages=c,c++,d,fortran,go,objc,obj-c++
2021-07-08 20:49:15 +03:00
make
2021-07-14 15:59:20 +03:00
make DESTDIR="$1" install
2021-07-04 19:08:09 +03:00
ln -s gcc "$1/usr/bin/cc"
2021-07-07 17:27:54 +03:00
echo "#!/bin/sh" > "$1"/usr/bin/c99
echo "exec cc -std=c99 "$@"" >> "$1"/usr/bin/c99
chmod +x "$1"/usr/bin/c99