Ticket #54198: gcc7.diff

File gcc7.diff, 5.7 KB (added by RJVB (René Bertin), 7 years ago)

upgrade to gcc 7.1.0

  • lang/gcc7/Portfile

    a b  
    55PortGroup compiler_blacklist_versions 1.0
    66
    77name                gcc7
    8 subport             libgcc-devel {}
     8subport             libgcc {}
    99
    10 epoch               1
    11 version             7-20170420
     10epoch               2
     11version             7.1.0
    1212platforms           darwin
    1313categories          lang
    1414maintainers         nomaintainer
    1515# an exception in the license allows dependents to not be GPL
    1616license             {GPL-3+ Permissive}
    17 description         The GNU compiler collection, prerelease BETA
     17description         The GNU compiler collection
    1818long_description    The GNU compiler collection, including front ends for \
    19                     C, C++, Objective-C, Objective-C++, and Fortran. \
    20                     This is a prerelease BETA version!
     19                    C, C++, Objective-C, Objective-C++, and Fortran.
    2120
    2221homepage            http://gcc.gnu.org/
    23 master_sites        ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \
    24                     ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/ \
    25                     http://gcc.skazkaforyou.com/snapshots/${version}/
     22master_sites        ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \
     23                    ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
     24                    ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
     25                    ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
     26                    gnu:gcc/gcc-${version}
    2627
    2728distname            gcc-${version}
    2829use_bzip2           yes
    2930
    30 checksums           rmd160  58ab8c87a1f78ec12135741844362089f0401e28 \
    31                     sha256  93d6e4b559c8191cb91dd49586a0020f0e239a119ccb7d329ff4d03e123c196a
     31checksums           rmd160  a228dc45a09eda91b1a201d234f9013b3009b461 \
     32                    sha256  8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17
    3233
    3334depends_lib         port:cctools \
    3435                    port:gmp \
    3536                    path:lib/pkgconfig/isl.pc:isl \
    3637                    port:ld64 \
    37                     port:libgcc-devel \
     38                    path:lib/libgcc/libgcc_s.1.dylib:libgcc \
    3839                    port:libiconv \
    3940                    port:libmpc \
    4041                    port:mpfr
     
    4950
    5051    # see https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00672.html
    5152    patchfiles-append         patch-float128.diff
     53    # cause `as` to be invoked with the -q option so that it
     54    # invokes the clang integrated assembler (instead of the obsolete GNU as)
     55    # `man as` claims that this is the default but clearly that is not true everywhere.
     56    patchfiles-append         patch-default-clang-assembler.diff
    5257}
    5358
    5459configure.dir       ${workpath}/build
     
    131136
    132137destroot.target     install install-info-host
    133138
    134 if {${subport} eq "libgcc-devel"} {
    135     conflicts       libgcc
     139set standardLibs    {libgcc_ext.10.4.dylib libgcc_ext.10.5.dylib \
     140    libgcc_s.1.dylib libgfortran.4.dylib libquadmath.0.dylib \
     141    libstdc++.6.dylib libobjc-gnu.4.dylib libgomp.1.dylib \
     142    libitm.1.dylib libssp.0.dylib libasan.0.dylib libatomic.1.dylib}
     143
     144if {${subport} eq "libgcc"} {
     145    conflicts       libgcc-devel
     146    long_description-append \
     147                    This port installs the standard runtime libraries, including libstdc++.
    136148
    137149    # http://trac.macports.org/ticket/35770
    138150    # http://trac.macports.org/ticket/38814
     
    146158    # version should continue to provide a subport for that and older gcc
    147159    # versions.
    148160
    149     depends_lib-delete port:libgcc-devel
     161    depends_lib-delete path:lib/libgcc/libgcc_s.1.dylib:libgcc
    150162
    151163    configure.args-delete --libdir=${prefix}/lib/${name}
    152164    configure.args-append --libdir=${prefix}/lib/libgcc
     
    166178        # Note that we really don't want to include libgcc_ext.10.[45].dylib here, but install_name_tool
    167179        # doesn't know how to change the id of stubs, and it's easier than recreating them for each
    168180        # gcc port.
    169         set dylibs {libgcc_ext.10.4.dylib libgcc_ext.10.5.dylib libgcc_s.1.dylib libgfortran.4.dylib libquadmath.0.dylib libstdc++.6.dylib libobjc-gnu.4.dylib libgomp.1.dylib libitm.1.dylib libssp.0.dylib libasan.0.dylib libatomic.1.dylib}
    170181
    171         foreach dylib ${dylibs} {
     182        foreach dylib ${standardLibs} {
    172183            # Different OS versions (eg: Leopard) or architectures (eg: PPC) don't produce all the dylibs
    173184            # https://trac.macports.org/ticket/40098
    174185            # https://trac.macports.org/ticket/40100
     
    208219        # For binary compatibility with binaries that linked against the old libstdcxx port
    209220        ln -s libgcc/libstdc++.6.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib
    210221    }
     222
    211223} else {
     224
    212225depends_run-append         port:gcc_select
    213226
    214227post-destroot {
     
    221234        file rename ${file} ${newfile}
    222235    }
    223236
    224     foreach dylib {libgcc_ext.10.4.dylib libgcc_ext.10.5.dylib libgcc_s.1.dylib libgfortran.3.dylib libquadmath.0.dylib libstdc++.6.dylib libobjc-gnu.4.dylib libgomp.1.dylib libitm.1.dylib libssp.0.dylib libasan.0.dylib libatomic.1.dylib} {
     237    foreach dylib ${standardLibs} {
    225238        # Different OS versions (eg: Leopard) or architectures (eg: PPC) don't produce all the dylibs
    226239        # https://trac.macports.org/ticket/40098
    227240        # https://trac.macports.org/ticket/40100
     
    274287configure.universal_args
    275288
    276289livecheck.type      regex
    277 livecheck.url       ftp://gcc.gnu.org/pub/gcc/snapshots/
    278 livecheck.regex     LATEST-${major} -> (${major}-\[0-9\]+)
     290livecheck.url       http://ftp.gnu.org/gnu/gcc/
     291livecheck.regex     gcc-(${major}\\.\[0-9.\]+)/