Compile and install gcc-4.8.0 under CentOS 6.4

Source: Internet
Author: User

Compile and install gcc-4.8.0 under CentOS 6.4

1. First download the source code

wget http: //ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2

2. Extract

tar -jxvf gcc-4.8.0.tar.bz2

3. Download the dependencies required for compilation.

cd gcc-4.8.0  ./contrib/download_prerequisites  cd ..

4. Create a compilation output directory

mkdir gcc-build-4.8.0

5. Go to the directory and run the following command to generate the makefile file.

cd gcc-build-4.8.0 ../gcc-4.8.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib

6. Execute the following command to compile

make -j4

So far, the compilation process has been completed. Wait until the compilation is completed ....

During compilation, the CPU runs at full capacity. About 40 minutes.

7. Install

sudo make install

8. Check the gcc version.

gcc --version

[arlen@Arlen-CentOS gcc-build-4.8.0]$ gcc --version gcc (GCC) 4.8.0 Copyright © 2013 Free Software Foundation, Inc. This program is free software. Please refer to the source code copyright statement. This software has no guarantee; Includes non-marketable and applicable warranties for a specific purpose. [arlen@Arlen-CentOS gcc-build-4.8.0]$

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.