下载三个库
http://ftp.gnu.org/gnu/mpfr/
http://www.multiprecision.org/mpc/download.html
ftp://ftp.gnu.org/gnu/gmp/
解压安装,顺序gmp-mpfr-mpc
./configure --prefix=/wk/gmp &&make &&make install
./configure --prefix=/wk/mpc/ --with-gmp=/wk/gmp --with-mpfr=/wk/mpfr &&make &&make install
./configure --prefix=/wk/mpc/ --with-gmp=/wk/gmp --with-mpfr=/wk/mpfr &&make &&make install
放进路径中
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/wk/gmp/lib:/wk/mpfr/lib:/wk/mpc/lib
下载gcc
cd gcc-5.4.0
./configure --prefix=/wk/gcc/ --with-mpfr=/wk/mpfr --with-gmp=/wk/gmp --with-mpc=/wk/mpc --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib
更新
export PATH=/wk/gcc/bin:/wk/gcc/lib64:$PATH
export LD_LIBRARY_PATH=/wk/gcc/lib/:$LD_LIBRARY_PATH
网友评论