name = "GCC"
version = '4.9.2'

local_local_binutilsver = '2.25'
versionsuffix = '-local_binutils-%s' % local_local_binutilsver

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
]
sources = [
    SOURCELOWER_TAR_BZ2,
    'gmp-6.0.0a.tar.bz2',
    'mpfr-%s.tar.gz' % local_mpfr_version,
    'mpc-1.0.2.tar.gz',
]

builddependencies = [('binutils', local_local_binutilsver)]

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

checksums = [
    '4df8ee253b7f3863ad0b86359cd39c43',     # gcc-4.9.2.tar.bz2
    'b7ff2d88cae7f8085bd5006096eed470',     # gmp-6.0.0a.tar.bz2
    '181aa7bb0e452c409f2788a4a7f38476',     # mpfr-3.1.2.tar.gz
    '68fadff3358fb3e7976c7a398a0af4c3',     # mpc-1.0.2.tar.gz
    '21958aaf3d242e51b2f45cefcb9560d9',     # mpfr-3.1.2-allpatches-20140630.patch
]

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

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

moduleclass = 'compiler'