Ticket #38814: libgcc.patch

File libgcc.patch, 41.7 KB (added by jeremyhu (Jeremy Huddleston Sequoia), 11 years ago)

libgcc.patch

  • dragonegg-3.0/Portfile

     
    99name                    dragonegg-${llvm_version}
    1010
    1111subport                 ${name}-gcc-4.5 {
    12     revision            1
     12    revision            2
    1313    set gcc_version     4.5
    1414    set gcc_version_no_dot 45
    1515}
    1616subport                 ${name}-gcc-4.6 {
    17     revision            1
     17    revision            2
    1818    set gcc_version     4.6
    1919    set gcc_version_no_dot 46
    2020}
  • dragonegg-3.1/Portfile

     
    99name                    dragonegg-${llvm_version}
    1010
    1111subport                 ${name}-gcc-4.5 {
    12     revision            1
     12    revision            2
    1313    set gcc_version     4.5
    1414    set gcc_version_no_dot 45
    1515}
    1616subport                 ${name}-gcc-4.6 {
    17     revision            1
     17    revision            2
    1818    set gcc_version     4.6
    1919    set gcc_version_no_dot 46
    2020}
    2121subport                 ${name}-gcc-4.7 {
    22     revision            1
     22    revision            2
    2323    set gcc_version     4.7
    2424    set gcc_version_no_dot 47
    2525}
  • dragonegg-3.2/Portfile

     
    99name                    dragonegg-${llvm_version}
    1010
    1111subport                 ${name}-gcc-4.5 {
    12     revision            1
     12    revision            2
    1313    set gcc_version     4.5
    1414    set gcc_version_no_dot 45
    1515}
    1616subport                 ${name}-gcc-4.6 {
    17     revision            1
     17    revision            2
    1818    set gcc_version     4.6
    1919    set gcc_version_no_dot 46
    2020}
    2121subport                 ${name}-gcc-4.7 {
    22     revision            1
     22    revision            2
    2323    set gcc_version     4.7
    2424    set gcc_version_no_dot 47
    2525}
  • dragonegg-3.3/Portfile

     
    99name                    dragonegg-${llvm_version}
    1010
    1111subport                 ${name}-gcc-4.5 {
    12     revision            2
     12    revision            3
    1313    set gcc_version     4.5
    1414    set gcc_version_no_dot 45
    1515}
    1616subport                 ${name}-gcc-4.6 {
    17     revision            2
     17    revision            3
    1818    set gcc_version     4.6
    1919    set gcc_version_no_dot 46
    2020}
    2121subport                 ${name}-gcc-4.7 {
    22     revision            2
     22    revision            3
    2323    set gcc_version     4.7
    2424    set gcc_version_no_dot 47
    2525}
    2626subport                 ${name}-gcc-4.8 {
    27     revision            2
     27    revision            3
    2828    set gcc_version     4.8
    2929    set gcc_version_no_dot 48
    3030}
  • dragonegg-3.4/Portfile

     
    99name                    dragonegg-${llvm_version}
    1010
    1111subport                 ${name}-gcc-4.5 {
    12     revision            3
     12    revision            4
    1313    set gcc_version     4.5
    1414    set gcc_version_no_dot 45
    1515}
    1616subport                 ${name}-gcc-4.6 {
    17     revision            3
     17    revision            4
    1818    set gcc_version     4.6
    1919    set gcc_version_no_dot 46
    2020}
    2121subport                 ${name}-gcc-4.7 {
    22     revision            3
     22    revision            4
    2323    set gcc_version     4.7
    2424    set gcc_version_no_dot 47
    2525}
    2626subport                 ${name}-gcc-4.8 {
    27     revision            3
     27    revision            4
    2828    set gcc_version     4.8
    2929    set gcc_version_no_dot 48
    3030}
    3131subport                 ${name}-gcc-4.9 {
    32     revision            2
     32    revision            3
    3333    set gcc_version     4.9
    3434    set gcc_version_no_dot 49
    3535}
  • gcc42/Portfile

     
    55
    66name                    gcc42
    77version                 4.2.4
    8 revision                7
     8revision                8
    99platforms               darwin
    1010categories              lang
    1111maintainers             mww openmaintainer
     
    4141universal_variant       no
    4242
    4343depends_lib             port:gmp port:mpfr port:libiconv
    44 depends_run             port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     44depends_run             port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc45
    4545
    4646depends_skip_archcheck-append gcc_select ld64 cctools
    4747license_noconflict  gmp mpfr
     
    117117        file delete -force ${destroot}${prefix}/share/man/man7 \
    118118                ${destroot}${prefix}/share/info
    119119
    120     if {[variant_isset universal]} {
    121         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    122             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    123                 eval delete [glob ${archdir}/libstdc++*]
     120    foreach dylib {libgcc_s.1.dylib libgfortran.3.dylib libstdc++.6.dylib libobjc-gnu.2.dylib libgomp.1.dylib libssp.0.dylib} {
     121        delete ${destroot}${prefix}/lib/${name}/${dylib}
     122        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    124123
    125                 # This symlink is provided as a transition aide and will be removed
    126                 # with a future revision of this port.
    127                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     124        if {[variant_isset universal]} {
     125            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     126                if {[file exists ${archdir}/${dylib}]} {
     127                    delete ${archdir}/${dylib}
     128                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     129                }
    128130            }
    129131        }
    130132    }
    131 
    132     # http://trac.macports.org/ticket/35770
    133     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    134 
    135     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    136 
    137     # This symlink is provided as a transition aide and will be removed
    138     # with a future revision of this port.
    139     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    140133}
    141134
    142135post-destroot {
  • gcc43/Portfile

     
    66
    77name                gcc43
    88version             4.3.6
    9 revision            7
     9revision            8
    1010platforms           darwin
    1111categories          lang
    1212maintainers         mww openmaintainer
     
    5555                    rmd160  cde38f66b4b952f52938dc50d7606a0e1ccc7d2f
    5656
    5757depends_lib         port:gmp port:mpfr port:libiconv
    58 depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     58depends_run         port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc45
    5959
    6060depends_skip_archcheck-append gcc_select ld64 cctools
    6161license_noconflict  gmp mpfr
     
    139139        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    140140    }
    141141
    142     if {[variant_isset universal]} {
    143         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    144             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    145                 eval delete [glob ${archdir}/libstdc++*]
     142    foreach dylib {libgcc_s.1.dylib libgfortran.3.dylib libstdc++.6.dylib libobjc-gnu.2.dylib libgomp.1.dylib libssp.0.dylib} {
     143        delete ${destroot}${prefix}/lib/${name}/${dylib}
     144        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    146145
    147                 # This symlink is provided as a transition aide and will be removed
    148                 # with a future revision of this port.
    149                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     146        if {[variant_isset universal]} {
     147            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     148                if {[file exists ${archdir}/${dylib}]} {
     149                    delete ${archdir}/${dylib}
     150                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     151                }
    150152            }
    151153        }
    152154    }
    153 
    154     # http://trac.macports.org/ticket/35770
    155     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    156 
    157     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    158 
    159     # This symlink is provided as a transition aide and will be removed
    160     # with a future revision of this port.
    161     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    162155}
    163156
    164157select.group        gcc
  • gcc44/Portfile

     
    77name                gcc44
    88epoch               1
    99version             4.4.7
    10 revision            6
     10revision            7
    1111platforms           darwin
    1212categories          lang
    1313maintainers         mww openmaintainer
     
    5656                    rmd160  660d8e2f8162458e463de6195e58391ee711ed59
    5757
    5858depends_lib         port:gmp port:mpfr port:libiconv
    59 depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     59depends_run         port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc45
    6060
    6161depends_skip_archcheck-append gcc_select ld64 cctools
    6262license_noconflict  gmp mpfr
     
    144144    file rename ${destroot}${prefix}/share/python/classfile.py \
    145145                ${destroot}${prefix}/share/python/classfile-44.py
    146146
    147     if {[variant_isset universal]} {
    148         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    149             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    150                 eval delete [glob ${archdir}/libstdc++*]
     147    foreach dylib {libgcc_s.1.dylib libgfortran.3.dylib libstdc++.6.dylib libobjc-gnu.2.dylib libgomp.1.dylib libssp.0.dylib} {
     148        delete ${destroot}${prefix}/lib/${name}/${dylib}
     149        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    151150
    152                 # This symlink is provided as a transition aide and will be removed
    153                 # with a future revision of this port.
    154                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     151        if {[variant_isset universal]} {
     152            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     153                if {[file exists ${archdir}/${dylib}]} {
     154                    delete ${archdir}/${dylib}
     155                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     156                }
    155157            }
    156158        }
    157159    }
    158 
    159     # http://trac.macports.org/ticket/35770
    160     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    161 
    162     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    163 
    164     # This symlink is provided as a transition aide and will be removed
    165     # with a future revision of this port.
    166     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    167160}
    168161
    169162select.group        gcc
  • gcc45/Portfile

     
    66
    77# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[34]-gcc-4.5
    88name                gcc45
     9subport             libgcc45 {}
     10
    911epoch               1
    1012version             4.5.4
    11 revision            7
     13revision            8
    1214platforms           darwin
    1315categories          lang
    1416maintainers         mww openmaintainer
     
    6264                    sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
    6365
    6466depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl
    65 depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     67depends_run         port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc45
    6668
    6769depends_skip_archcheck-append gcc_select ld64 cctools
    6870license_noconflict  gmp mpfr ppl libmpc
     
    139141
    140142destroot.target     install install-info-host
    141143
     144if {${subport} == "libgcc45"} {
     145    # http://trac.macports.org/ticket/35770
     146    # http://trac.macports.org/ticket/38814
     147    # While there can be multiple versions of these runtimes in a single
     148    # process, it is not possible to pass objects between different versions,
     149    # so we simplify this by having the libgcc port provide the newest version
     150    # of these runtimes for all versions of gcc to use.
     151    #
     152    # If there is a binary incompatible change to the runtime in a future
     153    # version of gcc, then the latest version of gcc to provide a given ABI
     154    # version should continue to provide a subport for that and older gcc
     155    # versions.
     156
     157    depends_run-delete path:lib/libgcc/libgcc_s.1.dylib:libgcc port:libgcc45
     158
     159    configure.args-delete --libdir=${prefix}/lib/${name}
     160    configure.args-append --libdir=${prefix}/lib/libgcc
     161
     162    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
     163    configure.args-append --enable-languages=c,c++,objc,obj-c++,lto,fortran
     164
     165    # TODO: Possibly disable bootstrap with appropriate configure flags.
     166    #       the problem is that libstdc++'s configure script tests for tls support
     167    #       using the running compiler (not gcc for which libstdc++ is being built).
     168    #       Thus when we build with clang, we get a mismatch
     169    # http://trac.macports.org/ticket/36116
     170    #compiler.blacklist-append {clang < 425}
     171    #configure.args-append --disable-bootstrap
     172    #build.target        all
     173
     174    post-destroot {
     175        file mkdir ${destroot}${prefix}/lib/libgcc.merged
     176
     177        set dylibs {libobjc-gnu.2.dylib}
     178
     179        foreach dylib ${dylibs} {
     180            move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
     181            if {[variant_isset universal]} {
     182                foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
     183                    set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
     184                    if {[file exists ${archdir}/${dylib}]} {
     185                        system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
     186                        foreach link ${dylibs} {
     187                            system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
     188                        }
     189                        system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
     190                    }
     191                }
     192            }
     193
     194            # strip debug symbols to supress debugger warnings:
     195            # http://trac.macports.org/attachment/ticket/34831
     196            system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
     197        }
     198
     199        file delete -force ${destroot}${prefix}/bin             
     200        file delete -force ${destroot}${prefix}/share
     201        file delete -force ${destroot}${prefix}/include
     202        file delete -force ${destroot}${prefix}/lib/libgcc
     203        file delete -force ${destroot}${prefix}/libexec
     204
     205        move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
     206    }
     207} else {
    142208post-destroot {
    143209    file delete -force ${destroot}${prefix}/share/man/man7 \
    144210        ${destroot}${prefix}/share/info
     
    156222        eval file copy ${worksrcpath}/../gcc-${version}/gcc/config/darwin-sections.def [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/plugin/include/config]
    157223    }
    158224
    159     if {[variant_isset universal]} {
    160         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    161             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    162                 eval delete [glob ${archdir}/libstdc++*]
     225    foreach dylib {libgcc_s.1.dylib libgfortran.3.dylib libstdc++.6.dylib libobjc-gnu.2.dylib libgomp.1.dylib libssp.0.dylib} {
     226        delete ${destroot}${prefix}/lib/${name}/${dylib}
     227        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    163228
    164                 # This symlink is provided as a transition aide and will be removed
    165                 # with a future revision of this port.
    166                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     229        if {[variant_isset universal]} {
     230            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     231                if {[file exists ${archdir}/${dylib}]} {
     232                    delete ${archdir}/${dylib}
     233                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     234                }
    167235            }
    168236        }
    169237    }
    170 
    171     # http://trac.macports.org/ticket/35770
    172     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    173 
    174     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    175 
    176     # This symlink is provided as a transition aide and will be removed
    177     # with a future revision of this port.
    178     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    179238}
    180239
    181240select.group        gcc
    182241select.file         ${filespath}/mp-${name}
    183242
     243}
     244
    184245platform darwin {
    185246    if {${os.major} == 8} {
    186247        # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248
  • gcc46/Portfile

     
    99
    1010# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[012] and dragonegg-3.[34]-gcc-4.6
    1111version             4.6.4
    12 revision            1
     12revision            2
    1313platforms           darwin
    1414categories          lang
    1515maintainers         mww openmaintainer
     
    4949                    sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
    5050
    5151depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
    52 depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     52depends_run         port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc
    5353
    5454depends_skip_archcheck-append gcc_select ld64 cctools
    5555license_noconflict  gmp mpfr ppl libmpc
     
    135135        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    136136    }
    137137
    138     if {[variant_isset universal]} {
    139         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    140             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    141                 eval delete [glob ${archdir}/libstdc++*]
     138    foreach dylib {libgcc_s.1.dylib libgfortran.3.dylib libquadmath.0.dylib libstdc++.6.dylib libgomp.1.dylib libssp.0.dylib} {
     139        delete ${destroot}${prefix}/lib/${name}/${dylib}
     140        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    142141
    143                 # This symlink is provided as a transition aide and will be removed
    144                 # with a future revision of this port.
    145                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     142        if {[variant_isset universal]} {
     143            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     144                if {[file exists ${archdir}/${dylib}]} {
     145                    delete ${archdir}/${dylib}
     146                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     147                }
    146148            }
    147149        }
    148150    }
    149 
    150     # http://trac.macports.org/ticket/35770
    151     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    152 
    153     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    154 
    155     # This symlink is provided as a transition aide and will be removed
    156     # with a future revision of this port.
    157     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    158151}
    159152
    160153select.group        gcc
  • gcc47/Portfile

     
    1010
    1111# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[34]-gcc-4.7
    1212version             4.7.3
    13 revision            1
     13revision            2
    1414platforms           darwin
    1515categories          lang
    1616maintainers         mww openmaintainer
     
    4949                    sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
    5050
    5151depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
    52 depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     52depends_run         port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc
    5353
    5454depends_skip_archcheck-append gcc_select ld64 cctools
    5555license_noconflict  gmp mpfr ppl libmpc
     
    134134        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
    135135    }
    136136
    137     if {[variant_isset universal]} {
    138         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    139             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    140                 eval delete [glob ${archdir}/libstdc++*]
     137    foreach 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} {
     138        delete ${destroot}${prefix}/lib/${name}/${dylib}
     139        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    141140
    142                 # This symlink is provided as a transition aide and will be removed
    143                 # with a future revision of this port.
    144                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     141        if {[variant_isset universal]} {
     142            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     143                if {[file exists ${archdir}/${dylib}]} {
     144                    delete ${archdir}/${dylib}
     145                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     146                }
    145147            }
    146148        }
    147149    }
    148 
    149     # http://trac.macports.org/ticket/35770
    150     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    151 
    152     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    153 
    154     # This symlink is provided as a transition aide and will be removed
    155     # with a future revision of this port.
    156     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    157150}
    158151
    159152select.group        gcc
  • gcc48/Portfile

     
    55PortGroup compiler_blacklist_versions 1.0
    66
    77name                gcc48
    8 subport             libstdcxx {}
     8subport             libgcc {}
    99
    1010# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[34]-gcc-4.8
    1111epoch               2
    1212version             4.8.1
    13 revision            1
     13revision            2
    1414platforms           darwin
    1515categories          lang
    1616maintainers         mww openmaintainer
     
    3535use_bzip2           yes
    3636
    3737depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
    38 depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     38depends_run         port:gcc_select port:ld64 port:cctools path:lib/libgcc/libgcc_s.1.dylib:libgcc
    3939
    4040depends_skip_archcheck-append gcc_select ld64 cctools
    4141license_noconflict  gmp mpfr ppl libmpc
     
    107107
    108108destroot.target     install install-info-host
    109109
    110 if {${subport} == "libstdcxx"} {
    111     conflicts       libstdcxx-devel
     110if {${subport} == "libgcc"} {
     111    conflicts       libgcc-devel
    112112
    113     patchfiles-append  force-static-gcc.patch
     113    # http://trac.macports.org/ticket/35770
     114    # http://trac.macports.org/ticket/38814
     115    # While there can be multiple versions of these runtimes in a single
     116    # process, it is not possible to pass objects between different versions,
     117    # so we simplify this by having the libgcc port provide the newest version
     118    # of these runtimes for all versions of gcc to use.
     119    #
     120    # If there is a binary incompatible change to the runtime in a future
     121    # version of gcc, then the latest version of gcc to provide a given ABI
     122    # version should continue to provide a subport for that and older gcc
     123    # versions.
    114124
    115     depends_run-delete path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     125    depends_run-delete path:lib/libgcc/libgcc_s.1.dylib:libgcc
    116126
    117127    configure.args-delete --libdir=${prefix}/lib/${name}
     128    configure.args-append --libdir=${prefix}/lib/libgcc
    118129
    119130    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
    120     configure.args-append --enable-languages=c++
     131    configure.args-append --enable-languages=c,c++,objc,obj-c++,lto,fortran
    121132
     133    # TODO: Possibly disable bootstrap with appropriate configure flags.
     134    #       the problem is that libstdc++'s configure script tests for tls support
     135    #       using the running compiler (not gcc for which libstdc++ is being built).
     136    #       Thus when we build with clang, we get a mismatch
    122137    # http://trac.macports.org/ticket/36116
    123     compiler.blacklist-append {clang < 425}
     138    #compiler.blacklist-append {clang < 425}
     139    #configure.args-append --disable-bootstrap
     140    #build.target        all
    124141
    125     configure.args-append --disable-bootstrap
    126     build.target        all
    127 
    128     destroot.target     install-target-libstdc++-v3
    129 
    130142    post-destroot {
    131         eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
    132         eval file delete [glob ${destroot}${prefix}/lib/libgcc*]
    133         file delete -force ${destroot}${prefix}/lib/gcc
    134         file delete -force ${destroot}${prefix}/share/gcc-${major}
    135         file delete -force ${destroot}${prefix}/include/${name}
     143        file mkdir ${destroot}${prefix}/lib/libgcc.merged
    136144
    137         # Don't install the linktime symlink.  The compilers will place this
    138         # in their libdir, and we don't want to break other toolchains by having
    139         # them link against this libstdc++ (at least not until it is built on
    140         # top of libc++abi).
    141         file delete ${destroot}${prefix}/lib/libstdc++.dylib
     145        set dylibs {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}
    142146
    143         # For compatibility.  Delete this eventually.
    144         system "touch ${destroot}${prefix}/lib/.libstdcxx"
    145 
    146         if {[variant_isset universal]} {
    147             foreach archdir [glob ${destroot}${prefix}/lib/*/] {
    148                 if {[file exists ${archdir}/libstdc++.6.dylib]} {
    149                     system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
    150                     system "lipo -create -output ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib && mv ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib"
     147        foreach dylib ${dylibs} {
     148            move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
     149            if {[variant_isset universal]} {
     150                foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
     151                    set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
     152                    if {[file exists ${archdir}/${dylib}]} {
     153                        system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
     154                        foreach link ${dylibs} {
     155                            system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
     156                        }
     157                        system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
     158                    }
    151159                }
    152                 file delete -force ${archdir}
    153160            }
     161
     162            # strip debug symbols to supress debugger warnings:
     163            # http://trac.macports.org/attachment/ticket/34831
     164            system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
    154165        }
     166
     167        file delete -force ${destroot}${prefix}/bin             
     168        file delete -force ${destroot}${prefix}/share
     169        file delete -force ${destroot}${prefix}/include
     170        file delete -force ${destroot}${prefix}/lib/libgcc
     171        file delete -force ${destroot}${prefix}/libexec
     172
     173        move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
     174
     175        # For binary compatibility with binaries that linked against the old libstdcxx port
     176        ln -s libgcc/libstdc++.6.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib
    155177    }
    156178} else {
    157179post-destroot {
     
    158180    file delete -force ${destroot}${prefix}/share/man/man7
    159181    file delete -force ${destroot}${prefix}/share/info
    160182
    161     if {[variant_isset universal]} {
    162         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    163             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    164                 eval delete [glob ${archdir}/libstdc++*]
     183    foreach 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} {
     184        delete ${destroot}${prefix}/lib/${name}/${dylib}
     185        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    165186
    166                 # This symlink is provided as a transition aide and will be removed
    167                 # with a future revision of this port.
    168                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     187        if {[variant_isset universal]} {
     188            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     189                if {[file exists ${archdir}/${dylib}]} {
     190                    delete ${archdir}/${dylib}
     191                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     192                }
    169193            }
    170194        }
    171195    }
    172 
    173     # http://trac.macports.org/ticket/35770
    174     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    175 
    176     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    177 
    178     # This symlink is provided as a transition aide and will be removed
    179     # with a future revision of this port.
    180     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    181196}
    182197
    183198select.group        gcc
  • gcc48/files/force-static-gcc.patch

     
    1 --- gcc/config/darwin.h.orig    2012-09-13 20:20:33.000000000 -0700
    2 +++ gcc/config/darwin.h 2012-09-13 20:23:03.000000000 -0700
    3 @@ -325,17 +325,6 @@ extern GTY(()) int darwin_ms_struct;
    4  #undef REAL_LIBGCC_SPEC
    5  #define REAL_LIBGCC_SPEC                                                  \
    6 -   "%{static-libgcc|static: -lgcc_eh -lgcc;                               \
    7 -      shared-libgcc|fexceptions|fgnu-runtime:                             \
    8 -       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4)       \
    9 -       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
    10 -       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)     \
    11 -       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)     \
    12 -       -lgcc ;                                                            \
    13 -      :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
    14 -       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
    15 -       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)     \
    16 -       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)     \
    17 -       -lgcc }"
    18 +   "-lgcc_eh -lgcc"
    19  
    20  /* We specify crt0.o as -lcrt0.o so that ld will search the library path.
    21  
  • gcc49/Portfile

     
    55PortGroup compiler_blacklist_versions 1.0
    66
    77name                gcc49
    8 subport             libstdcxx-devel {}
     8subport             libgcc-devel {}
    99
    1010# Whenever this port is bumped for version/revision, please revbump dragonegg-3.4-gcc-4.9
    1111version             4.9-20130804
    12 revision            1
     12revision            2
    1313platforms           darwin
    1414categories          lang
    1515maintainers         mww openmaintainer
     
    3636use_bzip2           yes
    3737
    3838depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
    39 depends_run         port:gcc_select port:ld64 port:cctools port:libstdcxx-devel
     39depends_run         port:gcc_select port:ld64 port:cctools port:libgcc-devel
    4040
    4141depends_skip_archcheck-append gcc_select ld64 cctools
    4242license_noconflict  gmp mpfr ppl libmpc
     
    108108
    109109destroot.target     install install-info-host
    110110
    111 if {${subport} == "libstdcxx-devel"} {
    112     conflicts       libstdcxx
     111if {${subport} == "libgcc-devel"} {
     112    conflicts       libgcc
    113113
    114     patchfiles-append  force-static-gcc.patch
     114    # http://trac.macports.org/ticket/35770
     115    # http://trac.macports.org/ticket/38814
     116    # While there can be multiple versions of these runtimes in a single
     117    # process, it is not possible to pass objects between different versions,
     118    # so we simplify this by having the libgcc port provide the newest version
     119    # of these runtimes for all versions of gcc to use.
     120    #
     121    # If there is a binary incompatible change to the runtime in a future
     122    # version of gcc, then the latest version of gcc to provide a given ABI
     123    # version should continue to provide a subport for that and older gcc
     124    # versions.
    115125
    116     depends_run-delete port:${subport}
     126    depends_run-delete port:libgcc-devel
    117127
    118128    configure.args-delete --libdir=${prefix}/lib/${name}
     129    configure.args-append --libdir=${prefix}/lib/libgcc
    119130
    120131    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
    121     configure.args-append --enable-languages=c++
     132    configure.args-append --enable-languages=c,c++,objc,obj-c++,lto,fortran
    122133
     134    # TODO: Possibly disable bootstrap with appropriate configure flags.
     135    #       the problem is that libstdc++'s configure script tests for tls support
     136    #       using the running compiler (not gcc for which libstdc++ is being built).
     137    #       Thus when we build with clang, we get a mismatch
    123138    # http://trac.macports.org/ticket/36116
    124     compiler.blacklist-append {clang < 425}
     139    #compiler.blacklist-append {clang < 425}
     140    #configure.args-append --disable-bootstrap
     141    #build.target        all
    125142
    126     configure.args-append --disable-bootstrap
    127     build.target        all
    128 
    129     destroot.target     install-target-libstdc++-v3
    130 
    131143    post-destroot {
    132         eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
    133         eval file delete [glob ${destroot}${prefix}/lib/libgcc*]
    134         file delete -force ${destroot}${prefix}/lib/gcc
    135         file delete -force ${destroot}${prefix}/share/gcc-${major}
    136         file delete -force ${destroot}${prefix}/include/${name}
     144        file mkdir ${destroot}${prefix}/lib/libgcc.merged
    137145
    138         # Don't install the linktime symlink.  The compilers will place this
    139         # in their libdir, and we don't want to break other toolchains by having
    140         # them link against this libstdc++ (at least not until it is built on
    141         # top of libc++abi).
    142         file delete ${destroot}${prefix}/lib/libstdc++.dylib
     146        set dylibs {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}
    143147
    144         # For compatibility.  Delete this eventually.
    145         system "touch ${destroot}${prefix}/lib/.libstdcxx"
    146 
    147         if {[variant_isset universal]} {
    148             foreach archdir [glob ${destroot}${prefix}/lib/*/] {
    149                 if {[file exists ${archdir}/libstdc++.6.dylib]} {
    150                     system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
    151                     system "lipo -create -output ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib && mv ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib"
     148        foreach dylib ${dylibs} {
     149            move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
     150            if {[variant_isset universal]} {
     151                foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
     152                    set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
     153                    if {[file exists ${archdir}/${dylib}]} {
     154                        system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
     155                        foreach link ${dylibs} {
     156                            system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
     157                        }
     158                        system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
     159                    }
    152160                }
    153                 file delete -force ${archdir}
    154161            }
     162
     163            # strip debug symbols to supress debugger warnings:
     164            # http://trac.macports.org/attachment/ticket/34831
     165            system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
    155166        }
     167
     168        file delete -force ${destroot}${prefix}/bin             
     169        file delete -force ${destroot}${prefix}/share
     170        file delete -force ${destroot}${prefix}/include
     171        file delete -force ${destroot}${prefix}/lib/libgcc
     172        file delete -force ${destroot}${prefix}/libexec
     173
     174        move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
     175
     176        # For binary compatibility with binaries that linked against the old libstdcxx port
     177        ln -s libgcc/libstdc++.6.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib
    156178    }
    157179} else {
    158180post-destroot {
     
    159181    file delete -force ${destroot}${prefix}/share/man/man7
    160182    file delete -force ${destroot}${prefix}/share/info
    161183
    162     if {[variant_isset universal]} {
    163         foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
    164             if {[file exists ${archdir}/libstdc++.6.dylib]} {
    165                 eval delete [glob ${archdir}/libstdc++*]
     184    foreach 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} {
     185        delete ${destroot}${prefix}/lib/${name}/${dylib}
     186        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
    166187
    167                 # This symlink is provided as a transition aide and will be removed
    168                 # with a future revision of this port.
    169                 ln -s ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib
     188        if {[variant_isset universal]} {
     189            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     190                if {[file exists ${archdir}/${dylib}]} {
     191                    delete ${archdir}/${dylib}
     192                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     193                }
    170194            }
    171195        }
    172196    }
    173 
    174     # http://trac.macports.org/ticket/35770
    175     eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
    176 
    177     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
    178 
    179     # This symlink is provided as a transition aide and will be removed
    180     # with a future revision of this port.
    181     ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    182197}
    183198
    184199select.group        gcc
  • gcc49/files/force-static-gcc.patch

     
    1 --- gcc/config/darwin.h.orig    2012-09-13 20:20:33.000000000 -0700
    2 +++ gcc/config/darwin.h 2012-09-13 20:23:03.000000000 -0700
    3 @@ -325,17 +325,6 @@ extern GTY(()) int darwin_ms_struct;
    4  #undef REAL_LIBGCC_SPEC
    5  #define REAL_LIBGCC_SPEC                                                  \
    6 -   "%{static-libgcc|static: -lgcc_eh -lgcc;                               \
    7 -      shared-libgcc|fexceptions|fgnu-runtime:                             \
    8 -       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4)       \
    9 -       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
    10 -       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)     \
    11 -       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)     \
    12 -       -lgcc ;                                                            \
    13 -      :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
    14 -       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)   \
    15 -       %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4)     \
    16 -       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5)     \
    17 -       -lgcc }"
    18 +   "-lgcc_eh -lgcc"
    19  
    20  /* We specify crt0.o as -lcrt0.o so that ld will search the library path.
    21  
  • libstdcxx/Portfile

     
     1# $Id$
     2
     3PortSystem  1.0
     4
     5name        libstdcxx
     6version     4.8.1
     7epoch       20130810
     8categories  lang
     9replaced_by libgcc
     10
     11subport libstdcxx-devel {
     12    version 4.9
     13    replaced_by libgcc-devel
     14}
     15
     16PortGroup   obsolete 1.0
     17