Created
February 28, 2014 08:25
-
-
Save melpon/9267346 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
set -ex | |
if [[ ! -e ~/local/gcc-4.8.2/bin/g++ ]]; then | |
pushd ~/ | |
PWD=`pwd` | |
# install gmp | |
wget http://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2 | |
tar xf gmp-5.1.2.tar.bz2 | |
pushd gmp-5.1.2 | |
./configure --prefix=$PWD/local/gmp-5.1.2 | |
make install | |
popd | |
rm -r gmp-5.1.2 | |
# install mpfr | |
wget http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.gz | |
tar xf mpfr-3.1.2.tar.gz | |
pushd mpfr-3.1.2 | |
./configure --prefix=$PWD/local/mpfr-3.1.2 | |
make install | |
popd | |
rm -r mpfr-3.1.2 | |
# install mpc | |
wget http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz | |
tar xf mpc-1.0.1.tar.gz | |
pushd mpc-1.0.1 | |
./configure --prefix=$PWD/local/mpc-1.0.1 | |
make install | |
popd | |
rm -r mpc-1.0.1 | |
# install gcc | |
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.gz | |
tar xf gcc-4.8.2.tar.gz | |
mkdir gcc-4.8.2_build | |
pushd gcc-4.8.2_build | |
../gcc-4.8.2/configure --prefix=$PWD/local/gcc-4.8.2 --enable-languages=c,c++ --enable-lto --disable-multilib --without-ppl --without-cloog-ppl --enable-checking=release --disable-nls --with-mpc=$PWD/local/mpc-1.0.1/lib --with-mpfr=$PWD/local/mpfr-3.1.2 --with-gmp=$PWD/local/gmp-5.1.2 | |
nice make -j2 | |
popd | |
rm -r gcc-4.8.2 | |
rm -r gcc-4.8.2_build | |
popd | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment