从 rpmfind 下载 src 源码包:
mkdir gcc-build gcc-install
cd gcc-build
../configure --prefix=/xxxxxx/gcc-install
提示:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
接着下载上面的源码包:
分别 安装 到指定目录。
接下来在 gcc 源码目录 configure 时候指定 包的路径 按照configure help 设置即可。