下载
https://gcc.gnu.org/pub/gcc/releases/gcc-7.5.0/gcc-7.5.0.tar.gz
编译
yum -y install bzip2 bzip2-devel gmp-devel mpfr-devel libmpc-devel gettext-devel texinfo
[root@dev-ec-0 src]# tar -zxvf /opt/software/gcc-7.5.0.tar.gz -C /usr/local/src
[root@dev-ec-0 gcc-7.5.0]# pwd
/usr/local/src/gcc-7.5.0
[root@dev-ec-0 gcc-7.5.0]# ./contrib/download_prerequisites
[root@dev-ec-0 gcc-7.5.0]# mkdir gcc-build-7.5.0
[root@dev-ec-0 gcc-7.5.0]# cd gcc-build-7.5.0/
生成Makefile
[root@dev-ec-0 gcc-build-7.5.0]# pwd
/usr/local/src/gcc-7.5.0/gcc-build-7.5.0
[root@dev-ec-0 gcc-build-7.5.0]# ../configure --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions -