Chinaunix首页 | 论坛 | 博客
  • 博客访问: 87895
  • 博文数量: 18
  • 博客积分: 510
  • 博客等级: 中士
  • 技术积分: 300
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-27 20:37
文章分类

全部博文(18)

文章存档

2011年(18)

分类: LINUX

2011-06-24 22:56:03

安装gcc需要GMP、MPFR、MPC这三个库,下载地址
1)安装gmp-4.3.2
mkdir gmp-build
../gmp-4.3.2/configure --prefix=/usr/local/gmp-4.3.2
make
make check
make install
2)安装mpfr-2.4.2
mkdir mpfr-build
../mpfr-2.4.2/configure --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2
3)安装mpc-0.8.1
mkdir mpc-build
../mpc-0.8.1/configure --prefix=/usr/local/mpc-0.8.1 --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2
4)安装gcc-4.5.0
mkdir gcc-build
../gcc-4.5.0/configure --prefix=/usr/local/gcc-4.5.0 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-5.0.1/lib:/usr/local/mpfr-2.4.2/lib
make
make check
make install
cd /usr/bin
ln -s /usr/local/gcc-4.5.0/bin/gcc gcc45
ln -s /usr/local/gcc-4.5.0/bin/g++ g++45
LD_LIBRARY_PATH=:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/gcc-4.5.0/lib
export LD_LIBRARY_PATH
阅读(664) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~