<pre style='margin:0'>
Mihai Moldovan (Ionic) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/0cd8874b6a94f3cd11c0b9d5d09532faa554afc4">https://github.com/macports/macports-ports/commit/0cd8874b6a94f3cd11c0b9d5d09532faa554afc4</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 0cd8874b6a94f3cd11c0b9d5d09532faa554afc4
</span>Author: Mihai Moldovan <ionic@ionic.de>
AuthorDate: Mon Jan 25 20:41:17 2021 +0100

<span style='display:block; white-space:pre;color:#404040;'>    lang/go: use legacy-support LDFLAGS with cgo as well.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Our special LDFLAGS (when needed on older systems) are not being used
</span><span style='display:block; white-space:pre;color:#404040;'>    when building cgo-based packages, leading to link errors.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Pass them down via CGO_LDFLAGS (augmenting the default flags -g and -O2,
</span><span style='display:block; white-space:pre;color:#404040;'>    just to play it safe) and add this to the notes.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Fixes: https://trac.macports.org/ticket/60611
</span>---
 lang/go/Portfile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/go/Portfile b/lang/go/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 77596343a81..933ef5a2549 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/go/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/go/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -92,7 +92,8 @@ if {${os.platform} eq "darwin" && ${os.major} <= ${legacysupport.newest_darwin_r
</span> 
     build.env-append    "GO_EXTLINK_ENABLED=1" \
                         "GO_LDFLAGS=\"-extldflags=${configure.ldflags}\"" \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                        "BOOT_GO_LDFLAGS=-extldflags=${configure.ldflags}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                        "BOOT_GO_LDFLAGS=-extldflags=${configure.ldflags}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                        "CGO_LDFLAGS=-g -O2 ${configure.ldflags}"
</span> 
     # Might be useful while debugging issues.
     #build.args          "-v=3"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -105,6 +106,7 @@ if {${os.platform} eq "darwin" && ${os.major} <= ${legacysupport.newest_darwin_r
</span>                       * GO_EXTLINK_ENABLED="1"
                     to always force go to use the external gcc or clang linker and
                       * GO_LDFLAGS="\\\"-extldflags=${configure.ldflags}\\\""
<span style='display:block; white-space:pre;background:#e0ffe0;'>+                      * CGO_LDFLAGS="-g -O2 ${configure.ldflags}"
</span>                     to force-link any binary against the legacy support library.\
                     Use exactly the quoting provided here, even if it may look odd,\
                     or compilation will fail.
</pre><pre style='margin:0'>

</pre>