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
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
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
8. Check the GCC version
[[email protected] gcc-build-4.8.0]$ gcc --version gcc (GCC) 4.8.0 Copyright © 2013 Free Software Foundation, Inc. 本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保; 包括没有适销性和某一专用目的下的适用性担保。 [[email protected] gcc-build-4.8.0]$ |
CentOS 6.5 Compile and install gcc-4.8.0 (RPM)