centos7上编译安装gcc 7.5.0

2021/4/19 7:27:02

本文主要是介绍centos7上编译安装gcc 7.5.0,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

下载

https://gcc.gnu.org/pub/gcc/releases/gcc-7.5.0/gcc-7.5.0.tar.gz

编译

yum -y install bzip2 bzip2-devel gmp-devel mpfr-devel libmpc-devel gettext-devel texinfo

[root@dev-ec-0 src]# tar -zxvf /opt/software/gcc-7.5.0.tar.gz -C /usr/local/src
[root@dev-ec-0 gcc-7.5.0]# pwd
/usr/local/src/gcc-7.5.0
[root@dev-ec-0 gcc-7.5.0]# ./contrib/download_prerequisites 

在这里插入图片描述

[root@dev-ec-0 gcc-7.5.0]# mkdir gcc-build-7.5.0 
[root@dev-ec-0 gcc-7.5.0]# cd gcc-build-7.5.0/

生成Makefile

[root@dev-ec-0 gcc-build-7.5.0]# pwd
/usr/local/src/gcc-7.5.0/gcc-build-7.5.0
[root@dev-ec-0 gcc-build-7.5.0]# ../configure --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions -


这篇关于centos7上编译安装gcc 7.5.0的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程