# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
subport libgcc8 { revision 2 }
# an exception in the license allows dependents to not be GPL
license {GPL-3+ Permissive}
description The GNU compiler collection.
long_description The GNU compiler collection, including front ends for \
C, C++, Objective-C, Objective-C++ and Fortran.
homepage https://gcc.gnu.org/
master_sites ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
checksums rmd160 4fba19867980d04bed1e62d46d4787c99f4fd13d \
sha256 196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080 \
depends_lib port:cctools \
path:lib/pkgconfig/isl.pc:isl \
depends_run port:gcc_select \
path:lib/libgcc/libgcc_s.1.dylib:libgcc
depends_skip_archcheck-append gcc_select ld64 cctools
license_noconflict gmp mpfr ppl libmpc zlib
set major [lindex [split ${version} .-] 0]
# Fix compilation with older cctools releases.
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033 comment 40
# Probably can be removed once gcc 8.3.0 is released.
patchfiles-append pr81033-v2.diff
configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
# see https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00672.html
patchfiles-append patch-float128.diff
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724