|
We write C / C ++ program naturally not lack a good compiler (GCC). In late April 2015, the GCC also to the 5.1.0 version, for C ++ 11/14 also has better support. Because a recent study OpenMP, Gcc-5.1.0 support OpenMP4.0 latest version. So, today we are concerned that the GCC compiler installation, the installation is the latest version of 5.1.0. Here we get into (the whole process of recommendation to the root user):
1. Download GCC source code:
- Wget ftp://mirrors.kernel.org/gnu/gcc/gcc-5.1.0/gcc-5.1.0.tar.gz2 decompression:
- Tar -zxvf gcc-5.1.0.tar.gz3 download dependencies required to compile:
cd gcc-5.1.0 // gcc unpacked files into the folder
./contrib/download_prerequisites // download dependency
cd .. // return to the upper directory 4. Set up the build output directory:
Mkdir gcc-build-5.1.05 enter the output directory, execute the following command, and generates the makefile:
cd gcc-build-5.1.0
../gcc-5.1.0/configure --enable-checking = release --enable-languages = c, c ++ --disable-multilib
2. Compile:
make -j4 next step is to wait for the whole process about 40 minutes. PS: best not to do it during the compilation process something else, the whole process CPU is fully loaded, if inexplicable cease, and also a lot of trouble later.
3. Install:
After the end of the compilation, we can perform the installation:
make install8 check the version:
gcc --version
Or gcc -vroot @ Ubuntu: ~ / Downloads /gcc-build-5.1.0$ gcc --version
gcc (GCC) 5.1.0
Copyright © 2015 Free Software Foundation, Inc.
This program is free software; see the source of the copyright notice. This software is no guarantee;
Including warranties of merchantability and no applicability under a special purpose. |
|
|
|