cmd/dist: disable math/big assembly when using the bootstrap compiler
The assembly in math/big may contain instructions that the bootstrap
compiler does not support. Disable it using the math_big_pure_go
build tag.
Fixes #17484.
Change-Id: I766cab6a888721ab4ed76ebdbfc87ad4e919ec41
Reviewed-on: https://go-review.googlesource.com/31142
Run-TryBot: Michael Munday <munday@ca.ibm.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index d035bb2..d5ca804 100644
--- a/src/cmd/dist/buildtool.go
+++ b/src/cmd/dist/buildtool.go
@@ -139,7 +139,9 @@
// Run Go 1.4 to build binaries. Use -gcflags=-l to disable inlining to
// workaround bugs in Go 1.4's compiler. See discussion thread:
// https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ
- run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-gcflags=-l", "-v", "bootstrap/cmd/...")
+ // Use the math_big_pure_go build tag to disable the assembly in math/big
+ // which may contain unsupported instructions.
+ run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-gcflags=-l", "-tags=math_big_pure_go", "-v", "bootstrap/cmd/...")
// Copy binaries into tool binary directory.
for _, name := range bootstrapDirs {