]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/ld: force external linking on linux/arm64 with cgo
authorShenghou Ma <minux@golang.org>
Fri, 3 Apr 2015 08:37:25 +0000 (04:37 -0400)
committerMinux Ma <minux@golang.org>
Wed, 8 Apr 2015 09:08:52 +0000 (09:08 +0000)
Update #10373.

Change-Id: I309e3df7608b9eef9339196fdc50dedf5f9439f5
Reviewed-on: https://go-review.googlesource.com/8452
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/cmd/internal/ld/lib.go

index 1b4d651068a292637e356d4decf5e0eeb103584d..94c0562b0f809070d8cd4129643f87799c0b85ba 100644 (file)
@@ -369,6 +369,12 @@ func loadlib() {
                }
        }
 
+       // cmd/7l doesn't support cgo internal linking
+       // This is https://golang.org/issue/10373.
+       if iscgo && goarch == "arm64" {
+               Linkmode = LinkExternal
+       }
+
        if Linkmode == LinkExternal && !iscgo {
                // This indicates a user requested -linkmode=external.
                // The startup code uses an import of runtime/cgo to decide