]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: disable math/big assembly when using the bootstrap compiler
authorMichael Munday <munday@ca.ibm.com>
Mon, 17 Oct 2016 18:09:40 +0000 (14:09 -0400)
committerMichael Munday <munday@ca.ibm.com>
Mon, 17 Oct 2016 18:26:20 +0000 (18:26 +0000)
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>

src/cmd/dist/buildtool.go

index d035bb2a7d26d82cab73e045334cd0578238f600..d5ca804306a99c3258510624f0cd8c3a0f58ffaa 100644 (file)
@@ -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 {