Linux compiler gcc-5.1.0

Source: Internet
Author: User
Tags gmp

The newest gcc-5.1.0 was released and couldn't wait to put it on the test.
Download gcc-5.1.0 in http://ftp.gnu.org/gnu/gcc/
Then extract to directory gcc-5.1.0/
Run

    

Download dependent packages required for compilation
GCC dependency packages are: m4-1.4.17.tar.gz,gmp-5.1.3.tar.gz mpfr-3.1.2.tar.gz mpc-1.0.3.tar.gz
But these packages are too new, these dependencies are too new, too old to be able to use only the appropriate version, so the use of GCC's own download relies on the best way.
And then under the same level directory of gcc-5.1.0/

mkdir GCC-build/CD GCC-build../gcc-5.1. 0/configure--Build=x86_64-linux-gnu --Prefix=/usr/Local/lib/gcc-5.1. 0 --Enable-checking=Release--Enable-languages=C,c++Fortran--Disable-multilib

After executing configure, the makefile file is generated and then:

make

If your computer has a 4-core CPU, you can directlymake -j4

install

OK, now there is a gcc-5.1.0 directory under your/usr/local/lib/, this directory is the gcc-5.1.0 installation directory. Just add the/usr/local/lib/gcc-5.1.0/bin to path.

If the above installation steps are too cumbersome to use the script I wrote directly:
gcc-install.sh script on GitHub
If the script download gcc-5.1.0 is slow (by the wall), then you can download the gcc-5.1.0.tar.gz to script the same level directory, then execute the script

Let's take a look at the dependency library if it's too new:
The following is an incorrect installation method: —————————————-
Download m4-1.4.17.tar.gz,gmp-5.1.3.tar.gz mpfr-3.1.2.tar.gz mpc-1.0.3.tar.gz First
Unzip all to the/root directory and then:
Installation M4: ——————————-

cd m4-1.4.17./configure --prefix=/usr/local/lib/m4-1.4.17makemake checkmake install

Installation GMP: ————————————

cd gmp-5.1.3./configure --prefix=/usr/local/lib/gmp-5.1.3makemake checkmake install

Installation MPFR: ———————————————

cd mpfr-3.1.2.--prefix=/usr/local/lib/mpfr-3.1.2  --with-gmp=/usr/local/lib/gmp-5.1.2makemake checkmake clean

Installing the MPC: ———————————————-

CD MPC-1.0. 3./configure--Prefix=/usr/Local/lib/mpc-1.0. 3   -- with-gmp=/usr/Local/lib/gmp-5.1. 3 -- with-MPFR=/usr/Local/lib/mpfr-3.1. 2Makemake Checkmake Install

Installing GCC: ———————————————————-

CD GCC-build/../gcc-5.1. 0/configure--Build=x86_64-linux-gnu --Prefix=/usr/Local/lib/gcc-5.1. 0 -- with-gmp=/usr/Local/lib/gmp-5.1. 3 -- with-MPFR=/usr/Local/lib/mpfr-3.1. 2 -- with-MPC=/usr/Local/lib/mpc-1.0. 3 --Enable-checking=Release--Enable-languages=C,c++Fortran--Disable-multilibMake-j4

An error occurred:
Configure:error:in '/ROOT/GCC-5.1.0/X86_64-UNKNOWN-LINUX-GNU/LIBGCC ': configure:error:cannot compute suffix of Object Files:cannot Compile
All right, or just follow the previous method to install it.

Linux compiler gcc-5.1.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.