author:headsen chen
date: 2018-10-12 15:11:35
1,环境:centos7.3 ,64位,内核 3.10
2,安装过程
#!/bin/bashyum install mpfr -yyum install gmp -yyum install *mpc* -yyum install glibc-static libstdc++-static -yyum -y install gcc gcc-c++cd /mntwget http://mirrors.concertpass.com/gcc/releases/gcc-6.3.0/gcc-6.3.0.tar.gztar fx gcc-6.3.0.tar.gz cd gcc-6.3.0/./contrib/download_prerequisites mkdir gcc-build-6.3.0../configure -enable-checking=release -enable-languages=c,c++ -disable-multilibmake -j4make install#配置环境变量mv /usr/bin/gcc /usr/bin/gcc4.4.7ln -s /usr/local/bin/gcc /usr/bin/gccmv /usr/bin/g++ /usr/bin/g++4.4.7ln -s /usr/local/bin/g++ /usr/bin/g++mv /usr/bin/cc /usr/bin/cc4.4.7ln -s /usr/local/bin/cc /usr/bin/ccmv /usr/bin/c++ /usr/bin/c++4.4.7ln -s /usr/local/bin/c++ /usr/bin/c++gcc --version