CentOS 6.5 Compile and install gcc-4.8.0

Source: Internet
Author: User

CentOS 6.5 Compile and install gcc-4.8.0

1. Download the source code first

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

2. Unzip

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. Build the compiled output directory

mkdir gcc-build-4.8.0

5. Enter this directory and execute 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

At this point, the compile step is complete. Slowly wait for the compilation to complete ....

The CPU is basically running at full load during the compilation process. About 40 minutes.

7. Installation

sudo make install

8. Check the GCC version

gcc --version

[[email protected] gcc-build-4.8.0]$ gcc --versiongcc (GCC) 4.8.0Copyright © 2013 Free Software Foundation, Inc.本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;包括没有适销性和某一专用目的下的适用性担保。[[email protected] gcc-build-4.8.0]$

CentOS 6.5 Compile and install gcc-4.8.0 (RPM)

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.