void-packages/srcpkgs/go/patches/gohostarch-bootstrap-fix.patch

29 lines
956 B
Diff

From e1b1b7856f416ca6ff086adc00adc89fd900992c Mon Sep 17 00:00:00 2001
From: Brad Fitzpatrick <bradfitz@golang.org>
Date: Thu, 26 Sep 2019 19:04:00 +0000
Subject: [PATCH] cmd/dist: fix bootstrap failure when GOHOSTARCH is set
Fixes #33977
Change-Id: I4b136788f08b08c53087af8d3cd56125e620b51b
Reviewed-on: https://go-review.googlesource.com/c/go/+/197602
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
---
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index f293891..f27ea17 100644
--- go/src/cmd/dist/buildtool.go
+++ go/src/cmd/dist/buildtool.go
@@ -250,6 +250,9 @@
archCaps = fileArch
fileArch = strings.ToLower(fileArch)
fileArch = strings.TrimSuffix(fileArch, "splitload")
+ if fileArch == os.Getenv("GOHOSTARCH") {
+ return "", false
+ }
if fileArch == strings.TrimSuffix(runtime.GOARCH, "le") {
return "", false
}