# GNU C Compiler
# Mostly required to support languages different than C or C++
[buildout]
extends =
  ../gettext/buildout.cfg
  ../gmp/buildout.cfg
  ../perl/buildout.cfg
  ../tar/buildout.cfg
  ../xz-utils/buildout.cfg
  ../binutils/buildout.cfg

parts =
  gcc

[gcc-common]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.gz
md5sum = 781bc0195edeb0ceaace8428f63ae63d
# make install does not work when several core are used
make-targets = install -j1

[gcc]
<= gcc-common
configure-options =
  --disable-bootstrap
  --disable-multilib
  --with-gmp=${gmp:location}
  --with-mpfr=${mpfr:location}
  --with-mpc=${mpc:location}
  --enable-languages="c,c++,fortran"
  --with-isl=${isl:location}
  --with-ld=${binutils:location}/bin/ld
  --with-as=${binutils:location}/bin/as
environment =
  LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${isl:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
  PATH=${binutils:location}/bin:${gettext:location}/bin:${perl:location}/bin:${tar:location}/bin:%(PATH)s

[gcc-minimal]
<= gcc-common
configure-options =
  --disable-bootstrap
  --disable-multilib
  --with-gmp=${gmp:location}
  --with-mpfr=${mpfr:location}
  --with-mpc=${mpc:location}
  --enable-languages=c
  --without-isl
  --without-cloog
environment =
  LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
  PATH=${perl:location}/bin:${tar:location}/bin:%(PATH)s