Changeset 97724 for trunk


Ignore:
Timestamp:
Sep 13, 2012, 8:34:58 AM (7 years ago)
Author:
jeremyhu@…
Message:

libstdcxx*: Fix +universal build and remove the linktime symlink so as to not break clang++.

Location:
trunk/dports/lang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/gcc47/Portfile

    r97713 r97724  
    121121# TODO: Optimize this.  We don't need to actually bootstrap gcc to build libstdc++
    122122if {${subport} == "libstdcxx"} {
     123    # Subport revisions start at 100, so we don't need to revbump the main port and subport together
     124    revision 100
     125
    123126    depends_run-delete path:lib/.libstdcxx:libstdcxx
    124127
     
    135138
    136139    post-destroot {
    137         eval delete [glob ${destroot}${prefix}/lib/*{a,py}]
     140        eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
    138141        file delete -force ${destroot}${prefix}/share/gcc-${major}
    139142        file delete -force ${destroot}${prefix}/include/${name}
    140143
     144        # Don't install the linktime symlink.  The compilers will place this
     145        # in their libdir, and we don't want to break other toolchains by having
     146        # them link against this libstdc++ (at least not until it is built on
     147        # top of libc++abi).
     148        file delete ${destroot}${prefix}/lib/libstdc++.dylib
     149
    141150        # base doesn't like the + in this depspec path:lib/libstdc++.dylib:libstdcxx
    142151        system "touch ${destroot}${prefix}/lib/.libstdcxx"
     152
     153        if {[variant_isset universal]} {
     154            foreach archdir [glob ${destroot}${prefix}/lib/*/] {
     155                if {[file exists ${archdir}/libstdc++.6.dylib]} {
     156                    system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
     157                    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"
     158                }
     159                file delete -force ${archdir}
     160            }
     161        }
    143162
    144163        # Some linkers don't optimize this unused link away.  TODO: Fix this in the build system
  • trunk/dports/lang/gcc48/Portfile

    r97713 r97724  
    102102# TODO: Optimize this.  We don't need to actually bootstrap gcc to build libstdc++
    103103if {${subport} == "libstdcxx-devel"} {
     104    # Subport revisions start at 100, so we don't need to revbump the main port and subport together
     105    revision 100
     106
    104107    depends_run-delete port:${subport}
    105108
     
    116119
    117120    post-destroot {
    118         eval delete [glob ${destroot}${prefix}/lib/*{a,py}]
     121        eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
    119122        file delete -force ${destroot}${prefix}/share/gcc-${major}
    120123        file delete -force ${destroot}${prefix}/include/${name}
    121124
     125        # Don't install the linktime symlink.  The compilers will place this
     126        # in their libdir, and we don't want to break other toolchains by having
     127        # them link against this libstdc++ (at least not until it is built on
     128        # top of libc++abi).
     129        file delete ${destroot}${prefix}/lib/libstdc++.dylib
     130
    122131        # base doesn't like the + in this depspec path:lib/libstdc++.dylib:libstdcxx
    123132        system "touch ${destroot}${prefix}/lib/.libstdcxx"
     133
     134        if {[variant_isset universal]} {
     135            foreach archdir [glob ${destroot}${prefix}/lib/*/] {
     136                if {[file exists ${archdir}/libstdc++.6.dylib]} {
     137                    system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
     138                    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"
     139                }
     140                file delete -force ${archdir}
     141            }
     142        }
    124143
    125144        # Some linkers don't optimize this unused link away.  TODO: Fix this in the build system
Note: See TracChangeset for help on using the changeset viewer.