GCC builds for x86_64 ##################### In this directory, GCC builds for linux x86_64 systems are provided. They encompass compilers for the c, c++ and fortran languages built on a linux system with glibc 2.6.1. The provided compilers need glibc 2.4 or newer, however the library libgomp needs glibc 2.6, so on most enterprise linux distributions you will not be able to link against libgomp, while the compilers itself should work fine. For most desktop linux installations this requirement should be no problem. The builds need fairly new auxiliary libraries however. If your system does not provide up-to-date libraries of libgmp and libmpfr, you can find them in the archive gcc-infrastructure.tar.xz. For GCC 4.5 and newer, you also need up-to-date libraries of libmpc, libelf, ppl and cloog-ppl, which you find in the infrastructure archive, too. GCC 4.8 switched to use cloog-0.18 and isl instead of cloog-ppl and ppl, so you will need these libraries. There is a replacement infrastructure archive gcc-4.8-infrastructure.tar.xz provided for GCC 4.8 and newer. Compression: The provided archives are compressed with xz (http://tukaani.org/xz/), which is an upcoming compression standard for linux platforms. On newer linux distributions, xz is installed per default, and from version 1.22 on, tar provides transparent decompression just like for gzip and bzip2. For systems not providing xz, binaries are provided in the archive xz.tar.gz. In the directory nightlies, you find daily builds of GCC trunk. The snapshots directory provides weekly to two-weekly builds of shapshots as found in ftp://gcc.gnu.org/pub/gcc/snapshots/. In the sources directory, you find the used source code archives. For these builds, libmudflap is disabled, and the libraries contain debug information. Builds for GCC 4.5 and newer are lto- and gold-enabled. Trunk and GCC 4.8 builds contain debug information. For illustration, here are the commands for trunk builds: ../gcc-trunk-source/gcc/configure \ --enable-languages=c,c++,fortran \ --enable-checking=release --disable-bootstrap \ --disable-libmudflap --disable-libstdcxx-pch --enable-libgomp \ --enable-lto --enable-gold --with-plugin-ld=/usr/bin/gold \ --prefix=/usr/local/gcc-trunk make -j4 CFLAGS='-g -O2' LIBCFLAGS='-g -O2' \ LIBCXXFLAGS='-g -O2 -fno-implicit-templates' install & use: -------------- Libraries: If you don't have all the needed auxiliary libraries, unpack gcc-infrastructure.tar.xz in a directory you like. If this directory is not a standard directory, you will either have to edit /etc/ld.so.conf and run ldconfig, or set LD_LIBRARY_PATH appropriately. For GCC 4.8 and newer, use gcc-4.8-infrastructure.tar.xz instead. If you want simultaneously use older and newer compiler versions, you can simply merge the two infrastructure archives, there are no conflicts. Compiler: Just unpack the archive in a directory you like. You may need to update the PATH variable to point to the bin directory of gcc: export PATH=my_new_gcc_directory/bin:$PATH If you do not perform static program builds, you may need to update LD_LIBRARY_PATH, use the ldconfig mechanism or use the -rpath link option: gfortran -Wl,--rpath,my_new_gcc_directory/lib64 -o myprogram myprogram.f If you want to build 32-bit executables, you can do as follows: gfortran -m32 -Wa,--32 -Wl,--rpath,my_new_gcc_directory/lib \ -Wl,--library-path,/usr/lib -o myprogram myprogram.f For GCC 4.6 onwards, the rpath approach does not work out-of-the-box, as libgfortran.so.3.0.0 has the wrong rpath built in after installing in a custom location. This results in libquadmath.so to be not found. You can however adjust the rpath of libgfortran.so.3.0.0 using patchelf (http://nixos.org/patchelf.html; to be able to debug libgfortran itself, you need version 0.7 or newer): patchelf --set-rpath my_new_gcc_directory/lib64 my_new_gcc_directory/lib64/libgfortran.so.3.0.0 patchelf --set-rpath my_new_gcc_directory/lib my_new_gcc_directory/lib/libgfortran.so.3.0.0 Happy hacking!