Gcc-5.1.0 Installation


Installation of gcc-5-1-0 on Triolith

Get the gcc-5.1.0 tar file:

cd workdir
wget ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/gcc.gnu.org/pub/gcc/releases/gcc-5.1.0/gcc-5.1.0.tar.gz
tar -zxvf gcc-5.1.0.tar.gz

Gcc installation is dependent on many prerequisites.

  • Get the The GNU Multiple Precision Arithmetic Library:
cd workdir
wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2
tar -xjf gmp-6.0.0a.tar.bz2
  • Get the GNU multiple-precision floating-point computations with correct rounding (MPFR). MPFR is based on the GMP multiple-precision library.
cd workdir
wget http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.bz2
tar -xjf mpfr-3.1.3.tar.bz2
  • Get Gnu Mpc. Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.
cd workdir
wget http://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz
tar -xzf mpc-1.0.1.tar.gz
  • Get Integer Set Library (ISL). ISL is a library for manipulating sets and relations of integer points bounded by affine constraints.
cd workdir
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.12.2.tar.bz2
tar -jxvf isl-0.12.2.tar.bz2
  • Get Chunky Loop Generator (CLooG). CLooG is the code generation library that is used in the Graphite loop transforms pass of GCC.
cd workdir
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1.tar.gz
tar -zxvf cloog-0.18.1.tar.gz

All the prerequistes downloaded should be available to gcc installer. For these create softlinks in the gcc folder:

cd workdir
cd gcc-5.1.0
ln -fs ../mpfr-3.1.2 mpfr
ln -fs ../gmp-6.0.0 gmp
ln -fs ../mpc-1.0.1 mpc
ln -fs ../isl-0.12.2 isl
ln -fs ../cloog-0.18.1 cloog

Now create a build directory:

cd workdir
mkdir -p build0 
cd build0

To confure gcc installation specify the installation folder.

../gcc-5.1.0/configure --prefix=installdir --enable-lto --enable-bootstrap --enable-languages=c,c++,fortran,lto --disable-multilib --disable-libmudflap --enable-threads=posix --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-checking=release --enable-__cxa_atexit --with-pic --with-system-zlib

After successful configure install gcc:

make -j 4
make install
make -k check

Chandan Basu - cbasu@nsc.liu.se
Published - 2015/08/03