gnu: go-1.14: Fix test failure with GCC 9+.

With GCC 9+, go-1.14 fails a test when the gold linker is not
available (https://github.com/golang/go/issues/39157). Backport the fix
for that from https://github.com/golang/go/commit/4ec4a79.

This is a followup to the 'master -> core-updates-frozen' merge in
c4133c43c7, which accidentally dropped this commit
(2818c66e93) due to the code in question being
moved to another part of the file on the master branch.

Reported on #guix by iskarian:
<https://logs.guix.gnu.org/guix/2021-08-14.log#214343>

* gnu/packages/golang.scm (go-1.14)[arguments]<#:phases>{prebuild}:
Fix test failure with GCC 9+.

Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
Sarah Morgensen 2021-08-14 15:47:36 -04:00 committed by Leo Famulari
parent c5b06d8f79
commit 74bc8e59df
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08

View file

@ -307,6 +307,11 @@ (define-public go-1.14
(("/bin/pwd") (which "pwd"))
(("/bin/sh") (which "sh")))
;; Backport fix for go-1.14 with GCC 9+
;; https://github.com/golang/go/issues/39157
(substitute* "cmd/go/note_test.go"
(("cannot find 'ld'") "cannot find [']ld[']"))
;; Add libgcc to runpath
(substitute* "cmd/link/internal/ld/lib.go"
(("!rpath.set") "true"))