转自:/s/blog_493667730100zt6n.html
从svn checkout svn:///svn/gcc/trunk拿了GCC的最新代码,打算编译了学东西习学习C++ 11的东西,结果在configure的时候出现如下问题:
/mpc 下载mpc-0.
../gmp-5.0.1/configure --prefix=/usr/local/gmp-5.0.1
../mpfr-3.1.0/configure --prefix=/usr/local/mpfr-3.1.0 --with-gmp=/usr/local/gmp-5.0.1
../mpc-0.9/configure --prefix=/usr/local/mpc-0.9 --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0
安装好这三个库之后,就可以正式开始安装gcc了。
#####这种方法在重启终端后失效,所以直接将他写入/etc/profile比较好
-------------------------------------------------------------------
或者:
参见:/u010445083/article/details/9298399
./blog/static/205049197201267113438532/
-------------------------------------------------------------------
然后是典型的configure,make,install三步曲。
--with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9
使用内建 specs。
COLLECT_GCC=/usr/local/gcc-4.7/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.7/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
目标:x86_64-unknown-linux-gnu
配置为:../trunk/configure --prefix=/usr/local/gcc-4.7 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9
线程模型:posix
gcc 版本 4.7.0 20120113 (experimental) (GCC)
---------------------------------------------------------------------------------------------------------------------------
GMP: http://down./edu_program/c/
GNU MP 是用C 语言写成的一个便携式库,它可以进行整数、有理数和浮点数的任意精度算术,其目标是为所有需要不能由基本C 类型直接支持的多精度类型的应用提供可能最快的算术。
MPFR: /pavel/mpfr/#intro
MPFR library allows user to conduct floating-point calculations with virtually any (restricted by available memory only) precision with correct rounding.
MPC: