操作系统:RedHat 6.5
原始GCC:gcc 4.4.7
步骤:
gcc-4.8.2.tar.gz,解压到gcc-4.8.2目录。
./contrib/download_prerequisites
下载依赖包。
如果不能联网,在实现将以下文件放入gcc-4.8.2目录下:
vi ./contrib/download_prerequisites
sudo yum install glibc-devel.i686 libstdc++-devel.i686
否则编译阶段会报以下error:
usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
./configure make -j8 sudo make install