]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: skip gccgo_link_c when cross-compiling
authorBryan C. Mills <bcmills@google.com>
Tue, 15 Aug 2023 22:07:51 +0000 (18:07 -0400)
committerBryan Mills <bcmills@google.com>
Wed, 16 Aug 2023 16:38:51 +0000 (16:38 +0000)
I don't understand the rationale given in
https://git.alpinelinux.org/aports/commit/community/go/tests-unset-GCCGO.patch?id=a10e9a5e48507198e26a8cf19709e4059da4c79f,
but I suspect that it may be working around test failures when
cross-compiling, since we have a lot of other gccgo tests that need to
skip in that circumstance.

Alternatively, that may just be a stale patch working around #53815.
I can't fine any issue filed against the Go project for this patch,
so it's hard to be sure.

Either way, adding this skip should make the test more robust.

For #62053.

Change-Id: I44dbe9a5a24c0e2d3f22fbe6ca995160a36b2606
Reviewed-on: https://go-review.googlesource.com/c/go/+/520056
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>

src/cmd/go/testdata/script/gccgo_link_c.txt

index f6c702a1670ef1df8943441d8d8e6181b90713ea..d37cb66247e5fe098da0c46b365fcd27dafa148c 100644 (file)
@@ -3,6 +3,7 @@
 
 [!cgo] skip
 [!exec:gccgo] skip
+[cross] skip  # gccgo can't necessarily cross-compile, so don't assume it will reach the step where we expect it to fail
 
 ! go build -x -compiler gccgo
 stderr 'gccgo.*\-L [^ ]*alibpath \-lalib' # make sure that Go-inline "#cgo LDFLAGS:" ("-L alibpath -lalib") passed to gccgo linking stage