<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/83152ae922c66ff3a7296ceed927921a9e6ce262">https://github.com/macports/macports-ports/commit/83152ae922c66ff3a7296ceed927921a9e6ce262</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 83152ae922c compiler_wrapper PG: handle cases where ports append flags to configure.cxx etc. Closes: https://trac.macports.org/ticket/62923
</span>83152ae922c is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 83152ae922c66ff3a7296ceed927921a9e6ce262
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Wed May 19 10:42:40 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> compiler_wrapper PG: handle cases where ports append flags to configure.cxx etc.
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/62923
</span>---
_resources/port1.0/group/compiler_wrapper-1.0.tcl | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/compiler_wrapper-1.0.tcl b/_resources/port1.0/group/compiler_wrapper-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index e1952852256..0e299297325 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/compiler_wrapper-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/compiler_wrapper-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -74,9 +74,13 @@ proc compwrap::comp_flags {tag} {
</span> }
proc compwrap::wrapped_command_path {tag origpath} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Some ports append compiler flags to the compiler 'commands'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove this here to only use the first argument, the compiler path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set csplit [split ${origpath} { }]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set strippath [lindex ${csplit} 0]
</span> # Return the path to the wrapper. Format is :-
# <port workpath>/<compiler tag>/<path to underlying compiler>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [option workpath]/compwrap/${tag}${origpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [option workpath]/compwrap/${tag}${strippath}
</span> }
proc compwrap::wrapped_compiler_path {tag} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -95,7 +99,7 @@ proc compwrap::wrap_compiler {tag} {
</span> # Get the underlying compiler
set comp [option configure.${tag}]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Get the wrapper
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Get the wrapper path
</span> set wrapcomp [compwrap::wrapped_compiler_path ${tag}]
if { ${wrapcomp} eq ${comp} } {
return ${comp}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -109,11 +113,21 @@ proc compwrap::wrap_compiler {tag} {
</span>
ui_debug "compiler_wrapper: Creating ${wrapcomp}"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set comp_opts [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Some ports append to the compiler path flags, as a hacky means to pass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # these to the build. Handle these by manually adding them to the wrapper script.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set csplit [split ${comp} { }]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [llength ${csplit}] > 1 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Found compiler flags appended to configure.${tag} : [lrange ${csplit} 1 end]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " [join [lrange ${csplit} 1 end]]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Force recreate in case underlying compiler has changed
file delete -force ${wrapcomp}
# Basic option, to pass on all command line arguments
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set comp_opts [join [option compwrap.compiler_pre_flags]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append comp_opts " [join [option compwrap.compiler_pre_flags]]"
</span> append comp_opts " [join [option compwrap.compiler_args_forward]]"
append comp_opts " [join [option compwrap.compiler_post_flags]]"
</pre><pre style='margin:0'>
</pre>