<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/3d9d2e11d1776714707339977fc02513b19c4c70">https://github.com/macports/macports-base/commit/3d9d2e11d1776714707339977fc02513b19c4c70</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3d9d2e1 Avoid recursion involving configure_get_cxx_stdlib
</span>3d9d2e1 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3d9d2e11d1776714707339977fc02513b19c4c70
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Mon Jun 4 12:27:58 2018 +1000
<span style='display:block; white-space:pre;color:#404040;'> Avoid recursion involving configure_get_cxx_stdlib
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Making the default value of configure.cxx_stdlib depend on the value of
</span><span style='display:block; white-space:pre;color:#404040;'> configure.cxx introduced a circular dependency, since get_compiler_fallback
</span><span style='display:block; white-space:pre;color:#404040;'> checks configure.cxx_stdlib to decide whether to add certain compilers.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The way variable traces work seems to have made this behave more or
</span><span style='display:block; white-space:pre;color:#404040;'> less correctly anyway (traces are temporarily removed while the
</span><span style='display:block; white-space:pre;color:#404040;'> associated proc is being executed) but it's better to make the
</span><span style='display:block; white-space:pre;color:#404040;'> behaviour explicit.
</span>---
src/port1.0/portconfigure.tcl | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 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 c9cc9d5..e3ad711 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;'>@@ -523,7 +523,9 @@ proc portconfigure::configure_get_default_compiler {} {
</span>
# internal function to choose compiler fallback list based on platform
proc portconfigure::get_compiler_fallback {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global xcodeversion macosx_deployment_target default_compilers configure.sdkroot configure.cxx_stdlib os.major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global xcodeversion macosx_deployment_target default_compilers \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.sdkroot configure.cxx_stdlib cxx_stdlib os.major \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option_defaults
</span>
# Check our override
if {[info exists default_compilers]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -581,7 +583,16 @@ proc portconfigure::get_compiler_fallback {} {
</span> }
# Determine which versions of clang we prefer
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${configure.cxx_stdlib} eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # There is a recursion trap here: the default value of configure.cxx_stdlib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # is determined by a proc that may end up calling us to find out which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # compiler is being used. So, bypass that if the option hasn't already
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # been set to a particular value.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists option_defaults(configure.cxx_stdlib)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set our_stdlib ${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set our_stdlib $cxx_stdlib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$our_stdlib eq "libc++"} {
</span> # clang-3.5+ require libc++
lappend compilers macports-clang-5.0 macports-clang-4.0
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -781,8 +792,7 @@ proc portconfigure::configure_main {args} {
</span> configure.perl configure.python configure.ruby configure.install configure.awk configure.bison \
configure.pkg_config configure.pkg_config_path \
configure.ccache configure.distcc configure.cpp configure.javac configure.sdkroot \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.march configure.mtune configure.cxx_stdlib \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- os.platform os.major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.march configure.mtune os.platform os.major
</span> foreach tool {cc cxx objc objcxx f77 f90 fc ld} {
global configure.${tool} configure.${tool}_archflags
}
</pre><pre style='margin:0'>
</pre>