CentOS6.5 gcc upgraded to 4.8.2

Source: Internet
Author: User

CentOS6.5 gcc upgraded to 4.8.2
Operating System: Centos 6.5 64-bit source 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:

./Contrib/download_prerequisites

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:

Make-j4

7. installation:

Make install

8. Verification:

Gcc-v or g ++-v

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.