用户工具

站点工具


zh:notes:update_gcc

这是本文档旧的修订版!


Update g++

Operation System

CentOS 6.8 (64 bits), CentOS 7.6 (64 bits)

Download the Latest Version

> wget http://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.gz
> tar -zxvf gcc-10.2.0.tgz

Download the Prerequisites

> cd gcc-10.2.0
> ./contrib/download_prerequisites

Make and Install

> mkdir gcc-build-10.2.0
> cd gcc-build-10.2.0
> ../configure -enable-checking=release -enable-language=c,c++ -disable-multilib
> make -j4 # for multi-core optimization
> make install
> ls /usr/local/bin |grep gcc # check whether it is installed successfully or not
 
#To restart the operation system,and then check the version. 
> gcc -v
zh/notes/update_gcc.1598600878.txt.gz · 最后更改: 2020/08/28 15:47 由 pzczxs