SUSE Linux Enterprise 11 SP3 成功编译安装GCC 4.8.2

################# Download GCC ###########################

Download GCC 4.8.2 from http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.2/ (seems quite promising for speed)

Supposed to be stored to ~/download

######################### GMP ###########################

Download GMP from https://gmplib.org/download/gmp/gmp-5.1.3.tar.lz

configure --prefix=/vobs/gcc/deps/

make -j4

make install -j4

######################### MPFR ###########################

http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2

configure --prefix=/vobs/gcc/deps/ --with-gmp=/vobs/gcc/deps/

make -j4

make install -j4

######################### MPC ###########################

http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz

configure --prefix=/vobs/gcc/deps/ --with-gmp=/vobs/gcc/deps/ --with-mpfr=/vobs/gcc/deps/

make -j4

make install -j4

################# ClooG & ISL (Git is needed) #################

svn checkout http://llvm.org/svn/llvm-project/polly/trunk /vobs/repo/polly
/vobs/repo/polly/utils/checkout_cloog.sh ~/build/cloog
mkdir ~/build/build_cloog
cd ~/build/build_cloog/
../cloog/configure --prefix=/vobs/gcc/deps/ --with-gmp-prefix=/vobs/gcc/deps/
make -j4 
make install -j4

################# Add below config to ~/.bashrc ##############
export LD_LIBRARY_PATH=/vobs/gcc/deps/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=/vobs/gcc/deps/lib/
export C_INCLUDE_PATH=/vobs/gcc/deps/include/
export CPLUS_INCLUDE_PATH=/vobs/gcc/deps/include/

################# Config & Build GCC 4.8.2 #################
cd ~/download
tar xjf gcc-4.8.2.tar.bz2
mkdir build
cd build

../gcc-4.8.2/configure --prefix=/vobs/gcc/4.8.2/

make -j4

make install -j4

################# Update ~/.bashrc ##############

export LD_LIBRARY_PATH=/vobs/gcc/deps/lib/:/vobs/gcc/4.8.2/lib64:$LD_LIBRARY_PATH
#export LIBRARY_PATH=/vobs/gcc/deps/lib/
#export C_INCLUDE_PATH=/vobs/gcc/deps/include/
#export CPLUS_INCLUDE_PATH=/vobs/gcc/deps/include/
export PATH=/vobs/gcc/4.8.2/bin/:${PATH}

################# Check GCC version ##############

gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

你可能感兴趣的:(Linux)