CentOS6.5gcc upgraded to 4.8.2

Source: Internet
Author: User
Operating system: Centos6.564-bit Source GCC version: 4.4.7; objective: to upgrade GCC to 4.8.2 to support C ++ 11. 1. get the GCC4.8.2 package: wgethttp: // container Operating system: Centos 6.5 64-bit original GCC version: 4.4.7; objective: to upgrade GCC to 4.8.2 to support C ++ 11. 1. get the GCC 4.8.2 package:

Wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2

2. decompress:

Tar-jvxf gcc-4.8.2.tar.bz2

3. downloading, configuring, and installing dependency libraries can save a lot of time and effort.

Enter the directory gcc-4.8.2 and run:


4. create an output directory and add it to the directory:

Mkdir gcc-build-4.8.2; cd gcc-build-4.8.2

5. Pre-compile

../Configure -- enable-checking = release -- enable-extensions ages = c, c ++ -- disable-multilib

-- Enable-extensions ages indicates the languages that your gcc must support. -- disable-multilib does not generate a cross compiler that compiles executable code on other platforms. -- The compiler generated by disable-checking does not perform additional checks during the compilation process. you can also use -- enable-checking = xxx to add some checks;

If-disable-multilib is not added, the yum install glibc-devel.i686 glibc-devel is required

6. Compile:


7. installation:

Make install

8. verification:

Gcc-v or g ++-v

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.