name = "GCC"
version = '4.9.1'
versionsuffix = "-CLooG"

homepage = 'http://gcc.gnu.org/'
description = """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada,
 as well as libraries for these languages (libstdc++, libgcj,...)."""

toolchain = SYSTEM

local_mpfr_version = '3.1.2'

source_urls = [
    # GCC auto-resolving HTTP mirror
    'http://ftpmirror.gnu.org/%(namelower)s/%(namelower)s-%(version)s',
    'http://ftpmirror.gnu.org/gmp',  # idem for GMP
    'http://ftpmirror.gnu.org/mpfr',  # idem for MPFR
    'http://www.multiprecision.org/mpc/download',  # MPC official
    'http://www.bastoul.net/cloog/pages/download/',  # CLooG official
    'ftp://gcc.gnu.org/pub/gcc/infrastructure/',  # GCC dependencies
    'http://gcc.cybermirror.org/infrastructure/',  # HTTP mirror for GCC dependencies
]
sources = [
    SOURCELOWER_TAR_BZ2,
    'gmp-6.0.0a.tar.bz2',
    'mpfr-%s.tar.gz' % local_mpfr_version,
    'mpc-1.0.2.tar.gz',
    'cloog-0.18.1.tar.gz',
    'isl-0.12.2.tar.bz2',
]

patches = [
    ('mpfr-%s-allpatches-20140630.patch' %
     local_mpfr_version,
     '../mpfr-%s' %
     local_mpfr_version)]

checksums = [
    'fddf71348546af523353bd43d34919c1',     # gcc-4.9.1.tar.gz
    'b7ff2d88cae7f8085bd5006096eed470',     # gmp-6.0.0a.tar.bz2
    '181aa7bb0e452c409f2788a4a7f38476',     # mpfr-3.1.2.tar.gz
    '68fadff3358fb3e7976c7a398a0af4c3',     # mpc-1.0.2.tar.gz
    'e34fca0540d840e5d0f6427e98c92252',     # cloog-0.18.1.tar.gz
    'e039bfcfb6c2ab039b8ee69bf883e824',     # isl-0.12.2.tar.bz2
    '21958aaf3d242e51b2f45cefcb9560d9',     # mpfr-3.1.2-allpatches-20140630.patch
]

languages = ['c', 'c++', 'fortran']

withcloog = True
withisl = True
clooguseisl = True

# building GCC sometimes fails if make parallelism is too high, so let's
# limit it
maxparallel = 4

moduleclass = 'compiler'