Skip to content

Commit 508f445

Browse files
ianlancetaylorgopherbot
authored andcommitted
cmd/dist: skip static linking tests for linux boringcrypto
Otherwise we get warnings from the C linker. Fixes golang#59422 Change-Id: I61843dbe5245da0185b0f23dc4b774767fffed40 Reviewed-on: https://go-review.googlesource.com/c/go/+/482315 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent a8ca653 commit 508f445

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/cmd/dist/test.go

+11
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,17 @@ func (t *tester) registerCgoTests() {
12661266
}
12671267
}
12681268

1269+
// Doing a static link with boringcrypto gets
1270+
// a C linker warning on Linux.
1271+
// in function `bio_ip_and_port_to_socket_and_addr':
1272+
// warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
1273+
if staticCheck.pre == nil && goos == "linux" && strings.Contains(goexperiment, "boringcrypto") {
1274+
staticCheck.pre = func(*distTest) bool {
1275+
fmt.Println("skipping static linking check on Linux when using boringcrypto to avoid C linker warning about getaddrinfo")
1276+
return false
1277+
}
1278+
}
1279+
12691280
// Static linking tests
12701281
if goos != "android" && p != "netbsd/arm" {
12711282
// TODO(#56629): Why does this fail on netbsd-arm?

0 commit comments

Comments
 (0)