# IT4Innovations 
# BS 2024

easyblock = 'EB_GCC'

name = 'GCCcore'
version = '13.2.0'

homepage = 'https://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 = {'name': 'foss', 'version': '2022b'}

local_local_mpfr_version = '4.0.2'

source_urls = [
    'https://ftpmirror.gnu.org/gnu/gcc/gcc-%(version)s',  # GCC auto-resolving HTTP mirror
    'https://ftpmirror.gnu.org/gnu/gmp',  # idem for GMP
    'https://ftpmirror.gnu.org/gnu/mpfr',  # idem for MPFR
    'https://ftpmirror.gnu.org/gnu/mpc',  # idem for MPC
    'ftp://gcc.gnu.org/pub/gcc/infrastructure/',  # GCC dependencies
    'http://gcc.cybermirror.org/infrastructure/',  # HTTP mirror for GCC dependencies
    'http://isl.gforge.inria.fr/',  # original HTTP source for ISL
]
sources = [
    'gcc-%(version)s.tar.gz',
    'gmp-6.1.2.tar.bz2',
    'mpfr-%s.tar.bz2' % local_local_mpfr_version,
    'mpc-1.1.0.tar.gz',
    'isl-0.21.tar.bz2',
]
patches = ['GCCcore-6.2.0-fix-find-isl.patch']
checksums = [
    'a931a750d6feadacbeecb321d73925cd5ebb6dfa7eff0802984af3aef63759f4',  # gcc-9.2.0.tar.gz
    '5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2',  # gmp-6.1.2.tar.bz2
    'c05e3f02d09e0e9019384cdd58e0f19c64e6db1fd6f5ecf77b4b1c61ca253acc',  # mpfr-4.0.2.tar.bz2
    '6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e',  # mpc-1.1.0.tar.gz
    'd18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859',  # isl-0.21.tar.bz2
    '5ad909606d17d851c6ad629b4fddb6c1621844218b8d139fed18c502a7696c68',  # GCCcore-6.2.0-fix-find-isl.patch
]

builddependencies = [
    ('M4', '1.4.18', '', True),
    ('binutils', '2.40'),
]

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

withisl = True

moduleclass = 'compiler'
