32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
|
From 09ff18f22def1766faa746df87e57d5b68454246 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
|
||
|
Date: Tue, 5 Mar 2024 10:03:13 +0100
|
||
|
Subject: [PATCH] Re-enable CGO in cmd/go and cmd/pprof
|
||
|
|
||
|
---
|
||
|
src/cmd/dist/build.go | 7 -------
|
||
|
1 file changed, 7 deletions(-)
|
||
|
|
||
|
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
|
||
|
index 32e59b446a..941abdcebd 100644
|
||
|
--- a/src/cmd/dist/build.go
|
||
|
+++ b/src/cmd/dist/build.go
|
||
|
@@ -1304,13 +1304,6 @@ func timelog(op, name string) {
|
||
|
// to switch between the host and target configurations when cross-compiling.
|
||
|
func toolenv() []string {
|
||
|
var env []string
|
||
|
- if !mustLinkExternal(goos, goarch, false) {
|
||
|
- // Unless the platform requires external linking,
|
||
|
- // 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")
|
||
|
- }
|
||
|
if isRelease || os.Getenv("GO_BUILDER_NAME") != "" {
|
||
|
// Add -trimpath for reproducible builds of releases.
|
||
|
// Include builders so that -trimpath is well-tested ahead of releases.
|
||
|
--
|
||
|
2.43.2
|
||
|
|
||
|
|