add new golang package patches

This commit is contained in:
Brandon Lester 2024-09-18 20:43:06 -07:00
parent fdd01e5d03
commit 841d33d1e7
3 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,30 @@
From 52d9cfec8124a9c7382bed5284246d9b18a21eb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
Date: Wed, 16 Aug 2023 07:06:38 +0200
Subject: [PATCH] Modify go.env
Change GOPROXY, GOSUMDB, and GOTOOLCHAIN
---
go.env | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/go.env b/go.env
index 6ff2b921d4..087208cd7c 100644
--- a/go.env
+++ b/go.env
@@ -4,9 +4,9 @@
# Use the Go module mirror and checksum database by default.
# See https://proxy.golang.org for details.
-GOPROXY=https://proxy.golang.org,direct
-GOSUMDB=sum.golang.org
+GOPROXY=direct
+GOSUMDB=off
# Automatically download newer toolchains as directed by go.mod files.
# See https://go.dev/doc/toolchain for details.
-GOTOOLCHAIN=auto
+GOTOOLCHAIN=local
--
2.41.0

View file

@ -0,0 +1,35 @@
From 7506da0af38aa307f45664f0c787b5767cc7a87f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
Date: Thu, 22 Jun 2023 17:19:00 +0200
Subject: [PATCH] Force gold in aarch64 until binutils 2.41 is on Fedora
---
src/cmd/link/internal/ld/lib.go | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index 91e2d5149c..99c305530b 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1605,15 +1605,13 @@ func (ctxt *Link) hostlink() {
// https://go.dev/issue/22040
altLinker = "gold"
- // If gold is not installed, gcc will silently switch
- // back to ld.bfd. So we parse the version information
- // and provide a useful error if gold is missing.
+ // In both cases, switch to gold if gold is available.
name, args := flagExtld[0], flagExtld[1:]
args = append(args, "-fuse-ld=gold", "-Wl,--version")
cmd := exec.Command(name, args...)
if out, err := cmd.CombinedOutput(); err == nil {
- if !bytes.Contains(out, []byte("GNU gold")) {
- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out)
+ if bytes.Contains(out, []byte("GNU gold")) {
+ altLinker = "gold"
}
}
}
--
2.40.1

View file

@ -0,0 +1,28 @@
From c0c22e2aa7d1901c97da04f834ce9c7b9e38be80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
Date: Sun, 11 Feb 2024 12:08:35 +0100
Subject: [PATCH] Skip TestCrashDumpsAllThreads
See golang.org/issues/64650
---
src/runtime/crash_unix_test.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go
index 123a462423..a0034d6455 100644
--- a/src/runtime/crash_unix_test.go
+++ b/src/runtime/crash_unix_test.go
@@ -74,6 +74,10 @@ func TestCrashDumpsAllThreads(t *testing.T) {
t.Skip("skipping; SIGQUIT is blocked, see golang.org/issue/19196")
}
+ if runtime.GOOS == "linux" && runtime.GOARCH == "s390x" {
+ t.Skip("skipping; frequent TestCrashDumpsAllThreads failures on linux/s390x, see golang.org/issue/64650")
+ }
+
testenv.MustHaveGoBuild(t)
if strings.Contains(os.Getenv("GOFLAGS"), "mayMoreStackPreempt") {
--
2.43.0