Last active
December 21, 2015 13:48
-
-
Save hellok/6314765 to your computer and use it in GitHub Desktop.
gcc centos
This file contains hidden or 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/bash | |
GCC_V='4.6.0' | |
sudo yum install -y glibc-static libstdc++-static | |
wget http://ftp.gnu.org/gnu/gcc/gcc-${GCC_V}/gcc-${GCC_V}.tar.gz -O gcc-${GCC_V}.tar.gz | |
tar xzf gcc-${GCC_V}.tar.gz | |
cd gcc-${GCC_V} | |
./contrib/download_prerequisites | |
cd .. | |
mkdir build_gcc${GCC_V} | |
cd build_gcc${GCC_V} | |
../gcc-${GCC_V}/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib | |
make -j23 | |
sudo make install | |
cd .. | |
rm -rf build_gcc${GCC_V} gcc-${GCC_V} gcc-${GCC_V}.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment