CentOS6.5 source code compilation and installation GCC5.2.0
The GNU Compiler Suite (GNU Compiler Collection) includes front ends of C, C ++, Objective-C, Fortran, Java, Ada, And Go languages, it also includes libraries of these languages (such as libstdc ++ and libgcj ). GCC was originally written for the GNU operating system as a compiler. The GNU system is completely free software. Here, "freedom" means that it respects the user's freedom. [1]
Recently, I am working on node. js development. When I download the source code and install it, the system prompts that the gcc version of the system is too low. So hurry to install the latest stable version of gcc-5.2.0
First download the latest gcc: https://gcc.gnu.org/
(Good guy, more than one hundred MB) Local download: Baidu online storage
Preparation start:
1: Decompress the package and go to the gcc directory.
> Tar-zxvf gcc-5.2.0.tar.gz
> Cd gcc-5.2.0
2: Install Dependencies
>./Contrib/download_prerequisites
# Automatically installs mpfr-2.4.2, gmp-4.3.2, mpc-0.8.1, isl-0.14
3: configuration options
>./Configure -- enable-checking = release -- enable-extensions ages = c, c ++ -- disable-multilib
4: Compile
> Make-j4
# The number after j can be adjusted based on the number of cpu cores to compile faster. The Compilation Time is generally relatively long. You can have a sister to have a cup of coffee and chat.