]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: on arm, all binaries depend on math
authorRuss Cox <rsc@golang.org>
Fri, 23 Jan 2015 16:08:32 +0000 (11:08 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 26 Jan 2015 20:01:54 +0000 (20:01 +0000)
Change-Id: I10b781927245a3e9822f9cffe254f226a5b93213
Reviewed-on: https://go-review.googlesource.com/3279
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/pkg.go

index 23154f91207699882ba98179f7a58dddcf0a28b1..f9fbe9c452e2b824400e365d77c6d1da7f690418 100644 (file)
@@ -524,6 +524,10 @@ func (p *Package) load(stk *importStack, bp *build.Package, err error) *Package
                if buildRace && (!p.Standard || !raceExclude[p.ImportPath]) {
                        importPaths = append(importPaths, "runtime/race")
                }
+               // On ARM with GOARM=5, everything depends on math for the link.
+               if p.ImportPath == "main" && goarch == "arm" {
+                       importPaths = append(importPaths, "math")
+               }
        }
 
        // Build list of full paths to all Go files in the package,