[119302] trunk/dports/devel/ld64/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Tue Apr 22 11:26:38 PDT 2014


Revision: 119302
          https://trac.macports.org/changeset/119302
Author:   jeremyhu at macports.org
Date:     2014-04-22 11:26:38 -0700 (Tue, 22 Apr 2014)
Log Message:
-----------
ld64: Use the libstdc++ workaround if it is manually chosen on Mavericks (#41627)

Modified Paths:
--------------
    trunk/dports/devel/ld64/Portfile

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2014-04-22 18:21:33 UTC (rev 119301)
+++ trunk/dports/devel/ld64/Portfile	2014-04-22 18:26:38 UTC (rev 119302)
@@ -76,6 +76,27 @@
 
 set makefile "Makefile-133"
 
+# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
+set cxx_stdlibflags {}
+platform darwin {
+    set cxxstdlib {}
+
+    if {[info exists configure.cxx_stdlib] &&
+        ${configure.cxx_stdlib} ne {} &&
+        [string match *clang* ${configure.cxx}]} {
+        set cxxstdlib ${configure.cxx_stdlib}
+    } elseif {[string match *clang* ${configure.cxx}] &&
+              ${os.major} >= 13} {
+        set cxxstdlib libc++
+    } else {
+        set cxxstdlib libstdc++
+    }
+
+    if {[string match *clang* ${configure.cxx}]} {
+        set cxx_stdlibflags -stdlib=${cxxstdlib}
+    }
+}
+
 if {${os.arch} eq "powerpc" || ${os.major} < 9} {
     # XCode 3.2.6
     # 127.2 should work for powerpc, but it will require some build fixes.
@@ -102,7 +123,7 @@
 
     patchfiles-delete   ld64-133-no-CrashReporterClient.h.patch ld64-136-i386-badAddress.patch
     patchfiles-append   ld64-127-any-cctools.patch
-} elseif {${os.major} < 13} {
+} elseif {${cxxstdlib} eq "libstdc++"} {
     patchfiles-append   ld64-136-hash_set.patch
 }
 
@@ -145,13 +166,6 @@
     system "cd ${worksrcpath} && ${build.cmd} src/ld/configure.h"
 }
 
-set cxx_stdlibflags {}
-if {[info exists configure.cxx_stdlib] &&
-    ${configure.cxx_stdlib} ne {} &&
-    [string match *clang* ${configure.cxx}]} {
-    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
-}
-
 build.args \
     CC="${configure.cc}" \
     CXX="${configure.cxx}" \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140422/2700e02c/attachment.html>


More information about the macports-changes mailing list