[110532] trunk/dports
larryv at macports.org
larryv at macports.org
Sun Sep 1 13:11:17 PDT 2013
Revision: 110532
https://trac.macports.org/changeset/110532
Author: larryv at macports.org
Date: 2013-09-01 13:11:17 -0700 (Sun, 01 Sep 2013)
Log Message:
-----------
Check for clang++ before adding -stdlib flag.
Modified Paths:
--------------
trunk/dports/devel/boost/Portfile
trunk/dports/devel/cctools/Portfile
trunk/dports/devel/gmp/Portfile
trunk/dports/devel/ld64/Portfile
trunk/dports/graphics/exiv2/Portfile
Modified: trunk/dports/devel/boost/Portfile
===================================================================
--- trunk/dports/devel/boost/Portfile 2013-09-01 20:02:56 UTC (rev 110531)
+++ trunk/dports/devel/boost/Portfile 2013-09-01 20:11:17 UTC (rev 110532)
@@ -95,7 +95,7 @@
if {[string length ${configure.sdkroot}] != 0} { set compileflags "<compileflags>\"-isysroot ${configure.sdkroot}\"" }
set linkflags ${configure.ldflags}
- if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {}} {
+ if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}} {
lappend linkflags -stdlib=${configure.cxx_stdlib}
}
Modified: trunk/dports/devel/cctools/Portfile
===================================================================
--- trunk/dports/devel/cctools/Portfile 2013-09-01 20:02:56 UTC (rev 110531)
+++ trunk/dports/devel/cctools/Portfile 2013-09-01 20:11:17 UTC (rev 110532)
@@ -117,7 +117,10 @@
build.target all
-if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {}} {
+if {[info exists configure.cxx_stdlib] &&
+ ${configure.cxx_stdlib} ne {} &&
+ [string match *clang* ${configure.cxx}]
+} then {
set stdlib_flag " -stdlib=${configure.cxx_stdlib}"
} else {
set stdlib_flag {}
Modified: trunk/dports/devel/gmp/Portfile
===================================================================
--- trunk/dports/devel/gmp/Portfile 2013-09-01 20:02:56 UTC (rev 110531)
+++ trunk/dports/devel/gmp/Portfile 2013-09-01 20:11:17 UTC (rev 110532)
@@ -36,7 +36,10 @@
configure.universal_args-delete --disable-dependency-tracking
# Since we need to clear CXXFLAGS, add -stdlib=... to CXX
-if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {}} {
+if {[info exists configure.cxx_stdlib] &&
+ ${configure.cxx_stdlib} ne {} &&
+ [string match *clang* ${configure.cxx}]
+} then {
configure.cxx-append -stdlib=${configure.cxx_stdlib}
}
Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile 2013-09-01 20:02:56 UTC (rev 110531)
+++ trunk/dports/devel/ld64/Portfile 2013-09-01 20:11:17 UTC (rev 110532)
@@ -145,19 +145,20 @@
system "cd ${worksrcpath} && ${build.cmd} src/ld/configure.h"
}
+set other_ldflags "${configure.ldflags} [get_canonical_archflags ld]"
+if {[info exists configure.cxx_stdlib] &&
+ ${configure.cxx_stdlib} ne {} &&
+ [string match *clang* ${configure.cxx}]
+} then {
+ append other_ldflags " -stdlib=${configure.cxx_stdlib}"
+}
build.args \
CC="${configure.cc}" \
CXX="${configure.cxx}" \
OTHER_CPPFLAGS="${configure.cppflags}" \
- OTHER_CFLAGS="${configure.cflags} [get_canonical_archflags]" \
- OTHER_CXXFLAGS="${configure.cxxflags} [get_canonical_archflags]"
-if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {}} {
- build.args-append \
- OTHER_LDFLAGS="${configure.ldflags} [get_canonical_archflags] -stdlib=${configure.cxx_stdlib}"
-} else {
- build.args-append \
- OTHER_LDFLAGS="${configure.ldflags} [get_canonical_archflags]"
-}
+ OTHER_CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+ OTHER_CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
+ OTHER_LDFLAGS="${other_ldflags}"
if {${os.major} >= 11} {
build.args-append \
Modified: trunk/dports/graphics/exiv2/Portfile
===================================================================
--- trunk/dports/graphics/exiv2/Portfile 2013-09-01 20:02:56 UTC (rev 110531)
+++ trunk/dports/graphics/exiv2/Portfile 2013-09-01 20:11:17 UTC (rev 110532)
@@ -32,7 +32,10 @@
destroot.destdir prefix=${destroot}${prefix}
# Custom Makefiles, yich...
-if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {}} {
+if {[info exists configure.cxx_stdlib] &&
+ ${configure.cxx_stdlib} ne {} &&
+ [string match *clang* ${configure.cxx}]
+} then {
configure.ldflags-append -stdlib=${configure.cxx_stdlib}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130901/43fbfc14/attachment-0001.html>
More information about the macports-changes
mailing list