天天看點

gcc4.9.2 for osx安裝GMP安裝MPFR安裝MPC安裝GCC

安裝GMP

cd gmp*;mkdir build && cd build  
../configure --prefix=/usr/local/gcc4.9.2 --enable-cxx
make;make install
           

安裝MPFR

cd ../../mpfr*;mkdir build && cd build  
../configure --prefix=/usr/local/gcc4.9.2 --with-gmp=/usr/local/gcc4.9.2
make;make install
           

安裝MPC

cd ../../mpc*;mkdir build && cd build  
../configure --prefix=/usr/local/gcc4.9.2 --with-gmp=/usr/local/gcc4.9.2 --with-mpfr=/usr/local/gcc4.9.2  
make;make install
           

安裝GCC

cd ../../gcc* ;mkdir build && cd build  
../configure --prefix=/usr/local/gcc4.9.2 --enable-checking=release --with-gmp=/usr/local/gcc4.9.2 --with-mpfr=/usr/local/gcc4.9.2 --with-mpc=/usr/local/gcc4.9.2 --program-suffix=4.9.2
           

可以隻需要特定語言,可以加個選項:--enable-languages=c,c++,fortran

接着:make最後:make install

配置環境變量

export GCC_HOME=/usr/local/gcc4.9.2export PATH=$GCC_HOME/bin:/usr/local/bin:$PG_HOME/bin:$FIREBIRD_HOME/bin:$PATH

-EOF-

繼續閱讀