Created
December 27, 2018 17:24
-
-
Save KunoiSayami/f185b940e61b34f030ce27dc66ab63bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
version=$1 | |
yum -y install gcc gcc-c++ kernel-devel glibc-static libstdc++-static | |
cd /opt | |
wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-$version/gcc-$version.tar.$2 | |
tar $3 gcc-$version.tar.$2 -C /usr/local/src | |
cd /usr/local/src/gcc-$version | |
./contrib/download_prerequisites | |
mkdir /usr/local/build | |
mkdir /usr/local/build/gcc-$version | |
cd /usr/local/build/gcc-$version | |
/usr/local/src/gcc-$version/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib | |
make && make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment