devtoolset(gcc,g++编译环境集)


devtoolset

Developer Toolset is designed for developers working on CentOS or Red Hat Enterprise Linux platform.
It provides current versions of the GNU Compiler Collection, GNU Debugger, and other development, debugging, and performance monitoring tools.

devtoolset版本:devtoolset-1.1 devtoolset-2 devtoolset-3 devtoolset-4,以上版本分别对应gcc的版本为4.7、4.8、4.9、5.2

centos

yum install centos-release-scl
yum install devtoolset-8

#使新的工具集生效
scl enable devtoolset-8 bash

[root@mulangcloud mulang-cloud-vddk]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@mulangcloud mulang-cloud-vddk]#  scl enable devtoolset-8 bash
[root@mulangcloud mulang-cloud-vddk]# gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

官方devtoolset-8安装教程

官方devtoolset-8

还支持docker

$ docker pull registry.access.redhat.com/rhscl/devtoolset-8-perftools-rhel7
$ docker pull registry.access.redhat.com/rhscl/devtoolset-8-toolchain-rhel7
$ docker pull centos/devtoolset-8-perftools-centos7
$ docker pull centos/devtoolset-8-toolchain-centos7

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: