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-04 19:08:09 +03:00
|
|
|
sed -i '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64
|
|
|
|
sed -i 's/lib64/lib/' gcc/gcc/config/i386/linux64.h
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
../configure --prefix=/usr --enable-languages=c,c++,d,fortran,go,objc,obj-c++
|
2021-07-08 18:28:30 +03:00
|
|
|
make -j`nproc`
|
2021-07-04 19:08:09 +03:00
|
|
|
make install DESTDIR="$1"
|
|
|
|
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
|
2021-07-04 19:08:09 +03:00
|
|
|
|