<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/4c98814c494a827a171f001273ecff7001039102">https://github.com/macports/macports-ports/commit/4c98814c494a827a171f001273ecff7001039102</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 4c98814c494 golang PG: Work around 'clang linker input unused' errors due to go's use of CC as linker command
</span>4c98814c494 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 4c98814c494a827a171f001273ecff7001039102
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Fri Apr 16 19:26:50 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> golang PG: Work around 'clang linker input unused' errors due to go's use of CC as linker command
</span>---
_resources/port1.0/group/golang-1.0.tcl | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/golang-1.0.tcl b/_resources/port1.0/group/golang-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 88b3a69c60a..04dc51943da 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/golang-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/golang-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,12 +169,16 @@ proc go.append_env {} {
</span> # legacy macOS support, are correctly passed.
if { ${os.major} <= [option legacysupport.newest_darwin_requires_legacy] } {
# Create a wrapper script around CC,CXX command to enforce use of flags required for legacy support
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note, go annoying uses CC for both building and linking, and thus in order to get it to correctly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # link to the legacy support library, the ldflags need to be added to the cc and ccx wrappers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # To then prevent 'clang linker input unused' errors we must append -Wno-error at the end.
</span> post-extract {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "echo '#!/bin/bash' > ${workpath}/go_cc_wrap"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "echo 'exec ${configure.cc} ${configure.cflags} ${configure.ldflags} \"\$\{\@\}\"' >> ${workpath}/go_cc_wrap"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set l_lib [legacysupport::get_library_name]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "echo '#!/bin/bash' > ${workpath}/go_cc_wrap"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "echo 'exec ${configure.cc} ${configure.cflags} ${configure.ldflags} \"\$\{\@\}\"' -Wno-error >> ${workpath}/go_cc_wrap"
</span> system "chmod +x ${workpath}/go_cc_wrap"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "echo '#!/bin/bash' > ${workpath}/go_cxx_wrap"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "echo 'exec ${configure.cxx} ${configure.cxxflags} ${configure.ldflags} \"\$\{\@\}\"' >> ${workpath}/go_cxx_wrap"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "echo '#!/bin/bash' > ${workpath}/go_cxx_wrap"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "echo 'exec ${configure.cxx} ${configure.cxxflags} ${configure.ldflags} \"\$\{\@\}\"' -Wno-error >> ${workpath}/go_cxx_wrap"
</span> system "chmod +x ${workpath}/go_cxx_wrap"
}
build.env-append "GO_EXTLINK_ENABLED=1" \
</pre><pre style='margin:0'>
</pre>