Centos7.0中 gcc升级-------使用gcc4.8.5编译gcc4.9.2

6170阅读 0评论2016-07-14 kowems
分类:LINUX

    Centos7中使用yum升级gcc目前只能升级到gcc4.8.5,webkit2.12 .3最低要求使用gcc4.9.0以上版本。从源码编译升级gcc吧。在这里只是做一个笔记用来记录升级过程中的一些阻碍和问题。
    从gnu的ftp上下载对应版本gcc源码,解压。执行gcc中自带的安装依赖包的脚本./contrib/download_prerequisites,会在当前目录中下载gmp、mpfr、mpc等包。将这些包编译,安装(./configure;make;sudo make install)。然后要执行make distclean,不然在后续configure时,会报错。
    config gcc使用如下命令,不然make时会报错:
    [eric@localhost build]$ ../configure --enable-languages=c,c++ --enable-multilib --enable-obsolete --disable-threads --without-headers --disable-multilib --disable-decimal-float --disable-libgomp --disable-libmudflap --disable-nls --disable-shared --disable-libssp --with-newlib

    上述错误:
    checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
    make[2]: *** [configure-stage1-zlib] Error 1




上一篇:Linux内核调用用户空间程序的一般方法分析
下一篇:Linux编辑Project(微软mpp文件)