Blame SOURCES/disable_static_external_tests.patch

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