aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-07-03 13:32:54 -0700
committerGopher Robot <gobot@golang.org>2022-07-06 16:22:03 +0000
commitf4755fc7333f524666f6ba3140cee0d180bce8b3 (patch)
treef636960092e2feec8935f921737e0e5d2b6ed860
parent4484c30f788835d8dda0afcefdb12e4b25b2c312 (diff)
downloadgo-f4755fc7333f524666f6ba3140cee0d180bce8b3.tar.gz
go-f4755fc7333f524666f6ba3140cee0d180bce8b3.zip
cmd/dist: use purego tag when building the bootstrap binaries
This is in addition to the current math_big_pure_go tag. Using purego ensures that we can build the cmd binaries with gccgo. For #53662 Change-Id: Ib82f8bf10659b5f94935f2b427ae8b2da875cd3b Reviewed-on: https://go-review.googlesource.com/c/go/+/415934 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com>
-rw-r--r--src/cmd/dist/buildtool.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index 947da115e3..400c2e85b6 100644
--- a/src/cmd/dist/buildtool.go
+++ b/src/cmd/dist/buildtool.go
@@ -204,6 +204,8 @@ func bootstrapBuildTools() {
// https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ
// Use the math_big_pure_go build tag to disable the assembly in math/big
// which may contain unsupported instructions.
+ // Use the purego build tag to disable other assembly code,
+ // such as in cmd/internal/notsha256.
// Note that if we are using Go 1.10 or later as bootstrap, the -gcflags=-l
// only applies to the final cmd/go binary, but that's OK: if this is Go 1.10
// or later we don't need to disable inlining to work around bugs in the Go 1.4 compiler.
@@ -211,7 +213,7 @@ func bootstrapBuildTools() {
pathf("%s/bin/go", goroot_bootstrap),
"install",
"-gcflags=-l",
- "-tags=math_big_pure_go compiler_bootstrap",
+ "-tags=math_big_pure_go compiler_bootstrap purego",
}
if vflag > 0 {
cmd = append(cmd, "-v")