cmd/internal/ld: force external linking on linux/arm64 with cgo

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>
This commit is contained in:
Shenghou Ma 2015-04-03 04:37:25 -04:00 committed by Minux Ma
parent 6508518849
commit 7a96ecde4d

View 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