Blame SOURCES/disable_static_external_tests.patch

2dcf06
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
2dcf06
index d9eb9c3..506f979 100644
2dcf06
--- a/src/cmd/dist/test.go
2dcf06
+++ b/src/cmd/dist/test.go
2dcf06
@@ -1180,18 +1180,20 @@ func (t *tester) cgoTest(dt *distTest) error {
2dcf06
 				fmt.Println("No support for static linking found (lacks libc.a?), skip cgo static linking test.")
2dcf06
 			} else {
2dcf06
 				if goos != "android" {
2dcf06
-					t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`)
2dcf06
+					t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, "-tags=no_openssl")
2dcf06
 				}
2dcf06
 				t.addCmd(dt, "misc/cgo/nocgo", t.goTest())
2dcf06
 				t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external`)
2dcf06
 				if goos != "android" {
2dcf06
-					t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`)
2dcf06
+					t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, "-tags=no_openssl")
2dcf06
+					/*
2dcf06
 					t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", "-ldflags", `-linkmode=external -extldflags "-static -pthread"`)
2dcf06
 					// -static in CGO_LDFLAGS triggers a different code path
2dcf06
 					// than -static in -extldflags, so test both.
2dcf06
 					// See issue #16651.
2dcf06
 					cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static")
2dcf06
 					setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
2dcf06
+					*/
2dcf06
 				}
2dcf06
 			}
2dcf06
 
2dcf06
@@ -1201,7 +1203,7 @@ func (t *tester) cgoTest(dt *distTest) error {
2dcf06
 					t.addCmd(dt, "misc/cgo/test", t.goTest(), "-buildmode=pie", "-ldflags=-linkmode=internal", "-tags=internal,internal_pie")
2dcf06
 				}
2dcf06
 				t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-buildmode=pie")
2dcf06
-				t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie")
2dcf06
+				t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", "-tags=no_openssl")
2dcf06
 			}
2dcf06
 		}
2dcf06
 	}
2dcf06
diff --git a/src/crypto/internal/boring/aes.go b/src/crypto/internal/boring/aes.go
2dcf06
index a495bd7..2c6107b 100644
2dcf06
--- a/src/crypto/internal/boring/aes.go
2dcf06
+++ b/src/crypto/internal/boring/aes.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/aes_test.go b/src/crypto/internal/boring/aes_test.go
2dcf06
index 3b4c364..371bc20 100644
2dcf06
--- a/src/crypto/internal/boring/aes_test.go
2dcf06
+++ b/src/crypto/internal/boring/aes_test.go
2dcf06
@@ -1,9 +1,5 @@
2dcf06
-// +build linux
2dcf06
-// +build !android
2dcf06
-// +build !no_openssl
2dcf06
-// +build !cmd_go_bootstrap
2dcf06
-// +build !msan
2dcf06
-// +build cgo
2dcf06
+//go:build linux && !android && !no_openssl && !cmd_go_bootstrap && !msan && cgo && !static
2dcf06
+// +build linux,!android,!no_openssl,!cmd_go_bootstrap,!msan,cgo,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/boring.go b/src/crypto/internal/boring/boring.go
2dcf06
index ec6e80c..05431b1 100644
2dcf06
--- a/src/crypto/internal/boring/boring.go
2dcf06
+++ b/src/crypto/internal/boring/boring.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/ecdsa.go b/src/crypto/internal/boring/ecdsa.go
2dcf06
index f72da41..33ee442 100644
2dcf06
--- a/src/crypto/internal/boring/ecdsa.go
2dcf06
+++ b/src/crypto/internal/boring/ecdsa.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/goboringcrypto.h b/src/crypto/internal/boring/goboringcrypto.h
2dcf06
index 4547ade..b8aaae4 100644
2dcf06
--- a/src/crypto/internal/boring/goboringcrypto.h
2dcf06
+++ b/src/crypto/internal/boring/goboringcrypto.h
2dcf06
@@ -1,6 +1,12 @@
2dcf06
 // Copyright 2017 The Go Authors. All rights reserved.
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
+// +build linux
2dcf06
+// +build !android
2dcf06
+// +build !no_openssl
2dcf06
+// +build !cmd_go_bootstrap
2dcf06
+// +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 // This header file describes the BoringCrypto ABI as built for use in Go.
2dcf06
 // The BoringCrypto build for Go (which generates goboringcrypto_*.syso)
2dcf06
diff --git a/src/crypto/internal/boring/goopenssl.h b/src/crypto/internal/boring/goopenssl.h
2dcf06
index 4820385..ac41482 100644
2dcf06
--- a/src/crypto/internal/boring/goopenssl.h
2dcf06
+++ b/src/crypto/internal/boring/goopenssl.h
2dcf06
@@ -6,6 +6,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 // This header file describes the OpenSSL ABI as built for use in Go.
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/hmac.go b/src/crypto/internal/boring/hmac.go
2dcf06
index 4e913c3..10cfbb3 100644
2dcf06
--- a/src/crypto/internal/boring/hmac.go
2dcf06
+++ b/src/crypto/internal/boring/hmac.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/notboring.go b/src/crypto/internal/boring/notboring.go
2dcf06
index e513834..08c5245 100644
2dcf06
--- a/src/crypto/internal/boring/notboring.go
2dcf06
+++ b/src/crypto/internal/boring/notboring.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl
2dcf06
-// +build !linux !cgo android cmd_go_bootstrap msan no_openssl
2dcf06
+//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl || static
2dcf06
+// +build !linux !cgo android cmd_go_bootstrap msan no_openssl static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/openssl_ecdsa_signature.c b/src/crypto/internal/boring/openssl_ecdsa_signature.c
2dcf06
index 710d074..853be3d 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_ecdsa_signature.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_ecdsa_signature.c
2dcf06
@@ -3,6 +3,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/openssl_evp.c b/src/crypto/internal/boring/openssl_evp.c
2dcf06
index 36be702..331dfd3 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_evp.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_evp.c
2dcf06
@@ -3,6 +3,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/openssl_lock_setup.c b/src/crypto/internal/boring/openssl_lock_setup.c
2dcf06
index 955924e..c0f3435 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_lock_setup.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_lock_setup.c
2dcf06
@@ -3,6 +3,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 #include <stdio.h>
2dcf06
diff --git a/src/crypto/internal/boring/openssl_port_aead_gcm.c b/src/crypto/internal/boring/openssl_port_aead_gcm.c
2dcf06
index b39bf54..80c933a 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_port_aead_gcm.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_port_aead_gcm.c
2dcf06
@@ -4,6 +4,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 #include <openssl/err.h>
2dcf06
diff --git a/src/crypto/internal/boring/openssl_port_ctr128.c b/src/crypto/internal/boring/openssl_port_ctr128.c
2dcf06
index abaff5c..e2263a5 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_port_ctr128.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_port_ctr128.c
2dcf06
@@ -3,6 +3,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/openssl_port_evp_md5_sha1.c b/src/crypto/internal/boring/openssl_port_evp_md5_sha1.c
2dcf06
index 8418c38..39bf3ae 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_port_evp_md5_sha1.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_port_evp_md5_sha1.c
2dcf06
@@ -4,6 +4,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 // The following is a partial backport of crypto/evp/m_md5_sha1.c,
2dcf06
 // commit cbc8a839959418d8a2c2e3ec6bdf394852c9501e on the
2dcf06
diff --git a/src/crypto/internal/boring/openssl_port_hmac.c b/src/crypto/internal/boring/openssl_port_hmac.c
2dcf06
index be7c71a..35e1860 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_port_hmac.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_port_hmac.c
2dcf06
@@ -4,6 +4,8 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
+
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/openssl_port_rsa.c b/src/crypto/internal/boring/openssl_port_rsa.c
2dcf06
index 5174f66..a8008e9 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_port_rsa.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_port_rsa.c
2dcf06
@@ -4,6 +4,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/openssl_stub_rand.c b/src/crypto/internal/boring/openssl_stub_rand.c
2dcf06
index 18d6777..e8ac53b 100644
2dcf06
--- a/src/crypto/internal/boring/openssl_stub_rand.c
2dcf06
+++ b/src/crypto/internal/boring/openssl_stub_rand.c
2dcf06
@@ -3,6 +3,7 @@
2dcf06
 // +build !no_openssl
2dcf06
 // +build !cmd_go_bootstrap
2dcf06
 // +build !msan
2dcf06
+// +build !static
2dcf06
 
2dcf06
 #include "goboringcrypto.h"
2dcf06
 #include <openssl/rand.h>
2dcf06
diff --git a/src/crypto/internal/boring/rand.go b/src/crypto/internal/boring/rand.go
2dcf06
index e9c334f..3adbd4d 100644
2dcf06
--- a/src/crypto/internal/boring/rand.go
2dcf06
+++ b/src/crypto/internal/boring/rand.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/rsa.go b/src/crypto/internal/boring/rsa.go
2dcf06
index b1a2f57..0cabadb 100644
2dcf06
--- a/src/crypto/internal/boring/rsa.go
2dcf06
+++ b/src/crypto/internal/boring/rsa.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06
 
2dcf06
diff --git a/src/crypto/internal/boring/sha.go b/src/crypto/internal/boring/sha.go
2dcf06
index bdcc782..6184d6c 100644
2dcf06
--- a/src/crypto/internal/boring/sha.go
2dcf06
+++ b/src/crypto/internal/boring/sha.go
2dcf06
@@ -2,8 +2,8 @@
2dcf06
 // Use of this source code is governed by a BSD-style
2dcf06
 // license that can be found in the LICENSE file.
2dcf06
 
2dcf06
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
2dcf06
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
2dcf06
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
2dcf06
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
2dcf06
 
2dcf06
 package boring
2dcf06