wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2tar -jxvf gcc-4.8.0.tar.bz2cd gcc-4.8.0./contrib/download_prerequisitescd ..mkdir gcc-build-4.8.0cd gcc-build-4.8.0../gcc-4.8.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilibsuod makesudo make installls /usr/local/bin | grep gcc添加新GCC到可选项,倒数第三个是名字,倒数第二个参数为新GCC路径,最后一个参数40为优先级,设大一些之后就自动使用新版了update-alternatives --install /usr/bin/gcc gcc /usr/local/bin/i686-pc-linux-gnu-gcc 40gcc -v