svn checkout svn://gcc.gnu.org/svn/gcc/trunk拿了GCC的最新代碼,打算編譯了學東西習學習C++ 11的東西,結果在configure的時候出現例如以下問題:
Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
http://www.multiprecision.org/mpc 下載mpc-0.9.tar.gz ../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了。
使用內建 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
配置為:../gcc-4.7.2/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)
開始C++ 11學習了。