From: Michael Munday Date: Mon, 17 Oct 2016 18:09:40 +0000 (-0400) Subject: cmd/dist: disable math/big assembly when using the bootstrap compiler X-Git-Tag: go1.8beta1~837 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6f4a6faf86238285fd02d2d04cbf3aeb51eb9d37;p=gostls13.git 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 Reviewed-by: Keith Randall TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index d035bb2a7d..d5ca804306 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -139,7 +139,9 @@ func bootstrapBuildTools() { // 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 {