Skip to content

Commit

Permalink
backport of fix linkage in RHEL builds to go1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
sipasing committed May 20, 2024
1 parent 47f280d commit eee1e1c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions patches/003-fix-linkage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index 8973a87168..4968e6c923 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -1315,7 +1315,9 @@ func toolenv() []string {
// we disable cgo to get static binaries for cmd/go and cmd/pprof,
// so that they work on systems without the same dynamic libraries
// as the original build system.
- env = append(env, "CGO_ENABLED=0")
+ //
+ // Setting CGO_ENABLED to 0 prevents cmd/go and the like from linking with vendored openssl symbols.
+ // env = append(env, "CGO_ENABLED=0")
}
if isRelease || os.Getenv("GO_BUILDER_NAME") != "" {
// Add -trimpath for reproducible builds of releases.

0 comments on commit eee1e1c

Please sign in to comment.