Changeset 109291


Ignore:
Timestamp:
Aug 12, 2013, 3:49:06 PM (6 years ago)
Author:
jeremyhu@…
Message:

gcc*: Add libgcc{,45,-devel} subports to replace libstdcxx{,-devel} subports

This reduces the possibility that conflicting emutls implementations
will be in the same process (#38814).

Fixes --enable-libstdccxx-time for gcc4[67] (#36364).

Removes ppl dependency for gcc4[89] (#38865).

Revbump dragonegg ports as required.

Location:
trunk/dports/lang
Files:
4 added
2 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/dragonegg-3.0/Portfile

    r108870 r109291  
    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
  • trunk/dports/lang/dragonegg-3.1/Portfile

    r108870 r109291  
    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
  • trunk/dports/lang/dragonegg-3.2/Portfile

    r108870 r109291  
    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
  • trunk/dports/lang/dragonegg-3.3/Portfile

    r108870 r109291  
    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
  • trunk/dports/lang/dragonegg-3.4/Portfile

    r108870 r109291  
    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
  • trunk/dports/lang/gcc42/Portfile

    r101426 r109291  
    66name                    gcc42
    77version                 4.2.4
    8 revision                7
     8revision                8
    99platforms               darwin
    1010categories              lang
     
    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
     
    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
  • trunk/dports/lang/gcc43/Portfile

    r102942 r109291  
    77name                gcc43
    88version             4.3.6
    9 revision            7
     9revision            8
    1010platforms           darwin
    1111categories          lang
     
    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
     
    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
  • trunk/dports/lang/gcc44/Portfile

    r102942 r109291  
    88epoch               1
    99version             4.4.7
    10 revision            6
     10revision            7
    1111platforms           darwin
    1212categories          lang
     
    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
     
    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
  • trunk/dports/lang/gcc45/Portfile

    r107857 r109291  
    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
     
    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
     
    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 \
     
    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++*]
    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 ${archdir}/libstdc++.6.dylib
     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}
     228
     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}
     242
     243}
    183244
    184245platform darwin {
  • trunk/dports/lang/gcc46/Portfile

    r107759 r109291  
    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
     
    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
    5656
    57 patchfiles          gcc-4.6-cloog_lang_c.patch
     57patchfiles          gcc-4.6-cloog_lang_c.patch enable_libstdcxx_time_yes.patch
    5858patch.dir           ${workpath}/gcc-${version}
    5959
     
    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
  • trunk/dports/lang/gcc47/Portfile

    r107759 r109291  
    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
     
    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
    5656
    57 patchfiles          ppc_fde_encoding.diff  gcc-PR-53453.patch
     57patchfiles          ppc_fde_encoding.diff gcc-PR-53453.patch enable_libstdcxx_time_yes.patch
    5858patch.dir           ${workpath}/gcc-${version}
    5959
     
    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
  • trunk/dports/lang/gcc48/Portfile

    r109274 r109291  
    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
     
    3535use_bzip2           yes
    3636
    37 depends_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
     37depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:cloog
     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
     
    7070                    --with-mpfr=${prefix} \
    7171                    --with-mpc=${prefix} \
    72                     --with-ppl=${prefix} \
    7372                    --with-cloog=${prefix} --enable-cloog-backend=isl \
    7473                    --disable-cloog-version-check \
     
    108107destroot.target     install install-info-host
    109108
    110 if {${subport} == "libstdcxx"} {
    111     conflicts       libstdcxx-devel
    112 
    113     patchfiles-append  force-static-gcc.patch
    114 
    115     depends_run-delete path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
     109if {${subport} == "libgcc"} {
     110    conflicts       libgcc-devel
     111
     112    # http://trac.macports.org/ticket/35770
     113    # http://trac.macports.org/ticket/38814
     114    # While there can be multiple versions of these runtimes in a single
     115    # process, it is not possible to pass objects between different versions,
     116    # so we simplify this by having the libgcc port provide the newest version
     117    # of these runtimes for all versions of gcc to use.
     118    #
     119    # If there is a binary incompatible change to the runtime in a future
     120    # version of gcc, then the latest version of gcc to provide a given ABI
     121    # version should continue to provide a subport for that and older gcc
     122    # versions.
     123
     124    depends_run-delete path:lib/libgcc/libgcc_s.1.dylib:libgcc
    116125
    117126    configure.args-delete --libdir=${prefix}/lib/${name}
     127    configure.args-append --libdir=${prefix}/lib/libgcc
    118128
    119129    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
    120     configure.args-append --enable-languages=c++
    121 
     130    configure.args-append --enable-languages=c,c++,objc,obj-c++,lto,fortran
     131
     132    # TODO: Possibly disable bootstrap with appropriate configure flags.
     133    #       the problem is that libstdc++'s configure script tests for tls support
     134    #       using the running compiler (not gcc for which libstdc++ is being built).
     135    #       Thus when we build with clang, we get a mismatch
    122136    # http://trac.macports.org/ticket/36116
    123     compiler.blacklist-append {clang < 425}
    124 
    125     configure.args-append --disable-bootstrap
    126     build.target        all
    127 
    128     destroot.target     install-target-libstdc++-v3
     137    #compiler.blacklist-append {clang < 425}
     138    #configure.args-append --disable-bootstrap
     139    #build.target        all
    129140
    130141    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}
    136 
    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
    142 
    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"
     142        file mkdir ${destroot}${prefix}/lib/libgcc.merged
     143
     144        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}
     145
     146        foreach dylib ${dylibs} {
     147            move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
     148            if {[variant_isset universal]} {
     149                foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
     150                    set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
     151                    if {[file exists ${archdir}/${dylib}]} {
     152                        system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
     153                        foreach link ${dylibs} {
     154                            system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
     155                        }
     156                        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}"
     157                    }
    151158                }
    152                 file delete -force ${archdir}
    153159            }
     160
     161            # strip debug symbols to supress debugger warnings:
     162            # http://trac.macports.org/attachment/ticket/34831
     163            system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
    154164        }
     165
     166        file delete -force ${destroot}${prefix}/bin             
     167        file delete -force ${destroot}${prefix}/share
     168        file delete -force ${destroot}${prefix}/include
     169        file delete -force ${destroot}${prefix}/lib/libgcc
     170        file delete -force ${destroot}${prefix}/libexec
     171
     172        move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
     173
     174        # For binary compatibility with binaries that linked against the old libstdcxx port
     175        ln -s libgcc/libstdc++.6.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib
    155176    }
    156177} else {
     
    159180    file delete -force ${destroot}${prefix}/share/info
    160181
    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++*]
    165 
    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
     182    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} {
     183        delete ${destroot}${prefix}/lib/${name}/${dylib}
     184        ln -s ${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/${name}/${dylib}
     185
     186        if {[variant_isset universal]} {
     187            foreach archdir [glob ${destroot}${prefix}/lib/${name}/*/] {
     188                if {[file exists ${archdir}/${dylib}]} {
     189                    delete ${archdir}/${dylib}
     190                    ln -s ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}
     191                }
    169192            }
    170193        }
    171194    }
    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
    181195}
    182196
  • trunk/dports/lang/gcc49/Portfile

    r109285 r109291  
    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-20130811
    12 revision            0
     12revision            1
    1313platforms           darwin
    1414categories          lang
     
    3636use_bzip2           yes
    3737
    38 depends_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
     38depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:cloog
     39depends_run         port:gcc_select port:ld64 port:cctools port:libgcc-devel
    4040
    4141depends_skip_archcheck-append gcc_select ld64 cctools
     
    7171                    --with-mpfr=${prefix} \
    7272                    --with-mpc=${prefix} \
    73                     --with-ppl=${prefix} \
    7473                    --with-cloog=${prefix} --enable-cloog-backend=isl \
    7574                    --disable-cloog-version-check \
     
    109108destroot.target     install install-info-host
    110109
    111 if {${subport} == "libstdcxx-devel"} {
    112     conflicts       libstdcxx
    113 
    114     patchfiles-append  force-static-gcc.patch
    115 
    116     depends_run-delete port:${subport}
     110if {${subport} == "libgcc-devel"} {
     111    conflicts       libgcc
     112
     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.
     124
     125    depends_run-delete port:libgcc-devel
    117126
    118127    configure.args-delete --libdir=${prefix}/lib/${name}
     128    configure.args-append --libdir=${prefix}/lib/libgcc
    119129
    120130    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
    121     configure.args-append --enable-languages=c++
    122 
     131    configure.args-append --enable-languages=c,c++,objc,obj-c++,lto,fortran
     132
     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
    123137    # http://trac.macports.org/ticket/36116
    124     compiler.blacklist-append {clang < 425}
    125 
    126     configure.args-append --disable-bootstrap
    127     build.target        all
    128 
    129     destroot.target     install-target-libstdc++-v3
     138    #compiler.blacklist-append {clang < 425}
     139    #configure.args-append --disable-bootstrap
     140    #build.target        all
    130141
    131142    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}
    137 
    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
    143 
    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"
     143        file mkdir ${destroot}${prefix}/lib/libgcc.merged
     144
     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}
     146
     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                    }
    152159                }
    153                 file delete -force ${archdir}
    154160            }
     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}"
    155165        }
     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
    156177    }
    157178} else {
     
    160181    file delete -force ${destroot}${prefix}/share/info
    161182
    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++*]
    166 
    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
     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}
     186
     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                }
    170193            }
    171194        }
    172195    }
    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
    182196}
    183197
Note: See TracChangeset for help on using the changeset viewer.