<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/02dcf61450c73beb03fa5afaa49ac45a7c011a82">https://github.com/macports/macports-base/commit/02dcf61450c73beb03fa5afaa49ac45a7c011a82</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 02dcf61450c73beb03fa5afaa49ac45a7c011a82
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sun Sep 16 05:14:42 2018 -0700
<span style='display:block; white-space:pre;color:#404040;'> incorporate cxx11 PortGroup features into base
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Use new variable compiler.cxx_standard to set
</span><span style='display:block; white-space:pre;color:#404040;'> -D_GLIBCXX_USE_CXX11_ABI=0 and
</span><span style='display:block; white-space:pre;color:#404040;'> configure.cxx_stdlib
</span>---
src/port1.0/portconfigure.tcl | 38 +++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portconfigure.tcl b/src/port1.0/portconfigure.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index c016849..c066951 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portconfigure.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portconfigure.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -77,14 +77,22 @@ proc portconfigure::should_add_stdlib {} {
</span> return [expr {$has_stdlib && $is_clang}]
}
proc portconfigure::should_add_cxx_abi {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_oldos [expr {[option os.platform] eq "darwin" && [option os.major] < 10}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set is_mp_gcc [regexp {(^|/)g\+\+-mp-.*} [option configure.cxx]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [expr {$is_oldos && $is_mp_gcc}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # prior to OS X Mavericks, libstdc++ was the default C++ runtime, so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # assume MacPorts libstdc++ must be ABI compatible with system libstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # for OS X Mavericks and above, users must select libstdc++, so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # assume they want default ABI compatibility
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://gcc.gnu.org/onlinedocs/gcc-5.2.0/libstdc++/manual/manual/using_dual_abi.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [expr {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [option configure.cxx_stdlib] eq "macports-libstdc++" &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [option os.platform] eq "darwin" &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [option os.major] < 13
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }]
</span> }
proc portconfigure::construct_cxxflags {flags} {
if {[portconfigure::should_add_stdlib]} {
lappend flags -stdlib=[option configure.cxx_stdlib]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {[portconfigure::should_add_cxx_abi]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[portconfigure::should_add_cxx_abi]} {
</span> lappend flags -D_GLIBCXX_USE_CXX11_ABI=0
}
return $flags
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -93,17 +101,25 @@ proc portconfigure::stdlib_trace {opt action args} {
</span> foreach flag [lsearch -all -inline [option $opt] -stdlib=*] {
$opt-delete $flag
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$action eq "read" && [portconfigure::should_add_stdlib]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $opt-append -stdlib=[option configure.cxx_stdlib]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach flag [lsearch -all -inline [option $opt] -D_GLIBCXX_USE_CXX11_ABI=0] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $opt-delete $flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$action eq "read"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[portconfigure::should_add_stdlib]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $opt-append -stdlib=[option configure.cxx_stdlib]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[portconfigure::should_add_cxx_abi]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $opt-append -D_GLIBCXX_USE_CXX11_ABI=0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# helper function to set configure.cxx_stdlib
</span> proc portconfigure::configure_get_cxx_stdlib {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global cxx_stdlib configure.cxx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![regexp {(^|/)g\+\+-mp-.*} ${configure.cxx}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $cxx_stdlib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global cxx_stdlib compiler.cxx_standard
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${cxx_stdlib} eq "libstdc++" && ${compiler.cxx_standard} >= 2011} {
</span> return macports-libstdc++
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ${cxx_stdlib}
</span> }
}
</pre><pre style='margin:0'>
</pre>