GNU Compiler Collection Admin

Prerequisites

Verify that the system binutils (which includes the GNU linker and assembler) is up-to-date. Might as well update the system gcc as well.


% sudo yum update binutils
% sudo yum update gcc

Installation


[make sure /usr/bin is ahead of /util/bin in your PATH variable, so you make the new gcc with the system gcc rather than the existing /util gcc.]

% cd /src/util
util% bunzip2 gcc-5.2.0.tar.bz2
util% tar -xvf gcc-5.2.0.tar
util% cd gcc-5.2.0
gcc-5.2.0% ./contrib/download_prerequisites
gcc-5.2.0% cd ..
util% mkdir gcc-5.2.0-build
gcc-5.2.0% cd gcc-5.2.0-build
gcc-5.2.0-build% ../gcc-5.2.0/configure --prefix=/util/gcc-5.2.0 --disable-multilib
gcc-5.2.0-build% make

[wait six hours while the software builds]

gcc-5.2.0-build% sudo make install clean
gcc-5.2.0-build% cd /util
/util% sudo ln -s gcc-5.2.0 gcc

Notes

  1. First, we highly recommend that GCC be built into a separate directory from the sources which does not reside within the source tree. This is how we generally build GCC; building where srcdir == objdir should still work, but doesn't get extensive testing; building where objdir is a subdirectory of srcdir is unsupported.
  2. Do we need 32-bit compatible libraries?

References

  1. http://gcc.gnu.org/mirrors.html
  2. http://gcc.gnu.org/install/configure.html
  3. http://gist.github.com/jeetsukumaran/5224956
  4. http://www.netgull.com/gcc/releases/
  5. http://gcc.gnu.org/wiki/FAQ#configure
  6. http://gcc.gnu.org/install/prerequisites.html
  7. ftp://gcc.gnu.org/pub/gcc/infrastructure/