修改WordPress网站,潍坊seo网络推广,2022好项目免加盟费,婚庆 网站模板获取gcc源码包# wget https://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2# tar -jxvf gcc-6.1.0.tar.bz2下载依赖项执行download_prerequisites将会自动下载这些软件并解压到当前目录#xff0c;生成gcc编译的make文件。自动安装gcc需要下载诸如gmp、mpfr、mpc等依赖文…获取gcc源码包# wget https://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2# tar -jxvf gcc-6.1.0.tar.bz2下载依赖项执行download_prerequisites将会自动下载这些软件并解压到当前目录生成gcc编译的make文件。自动安装gcc需要下载诸如gmp、mpfr、mpc等依赖文件# cd gcc-6.1.0# ./contrib/download_prerequisites如果你的Linux无法直接联网那么你只能打开文件download_prerequisites获取到这些文件的下载链接然后通过其他上网设备下载这些软件。最后把这些软件直接解压到gcc源程序目录(/路径/6.1.0)下即可。编译安装# mkdir gcc-build# cd gcc-build# ../configure -enable-checkingrelease -enable-languagesc,c -disable-multilib# make# make install注意make的-j选项可以指定同时运行的作业数量即CPU核数如果有4核则可以加上-j4出错解决1.make过程中可能会出现以下错误信息build/genattrtab ../.././gcc/config/i386/i386.md insn-conditions.md \-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.cmake[3]: *** [s-attrtab] Killedmake[3]: Leaving directory /usr/src/gcc-4.9.2/host-x86_64-unknown-linux-gnu/gccmake[2]: *** [all-stage1-gcc] Error 2make[2]: Leaving directory /usr/src/gcc-4.9.2make[1]: *** [stage1-bubble] Error 2make[1]: Leaving directory /usr/src/gcc-4.9.2make: *** [all] Error 22.动态库libstdc.so.6版本不匹配可以正常编译程序但是运行时出现以下问题/usr/lib/libstdc.so.6: version GLIBCXX_3.4.15’ not found添加LD_LIBRARY_PATH环境变量即可解决# vim ~/.bash_profileexport LD_LIBRARY_PATH/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64# source ~/.bash_profileGCC新特征GCC 6.1 发布了该版本较之前GCC5 新怎了大量的功能特性默认采用C14为新的标准替代了之前的C98。OpenMP 4.5规范将在本版本中被支持。此外GCC 6.1 增强了对 C17 的试验性支持大大改进了诊断特性包括位置位置范围拼写错误标识符建议选项名字等等改进新增了修复提示和一些警告提示。改进记录如下UndefinedBehaviorSanitizer gained a new sanitization option, -fsanitizebounds-strict, which enables strict checking of array bounds. In particular, it enables -fsanitizebounds as well as instrumentation of flexible array member-like arrays.Type-based alias analysis now disambiguates accesses to different pointers. This improves precision of the alias oracle by about 20-30% on higher-level C programs. Programs doing invalid type punning of pointer types may now need -fno-strict-aliasing to work correctly.Alias analysis now correctly supports weakref and alias attributes. This makes it possible to access both a variable and its alias in one translation unit which is common with link-time optimization.Value range propagation now assumes that the this pointer of C member functions is non-null. This eliminates common null pointer checks but also breaks some non-conforming code-bases (such as Qt-5, Chromium, KDevelop). As a temporary work-around-fno-delete-null-pointer-checks can be used. Wrong code can be identified by using-fsanitizeundefined.完整发布说明可以在这里查看。参考文章(CSDN的Markdown不好用)