Commit 7a96ecde authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

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

Update #10373.

Change-Id: I309e3df7608b9eef9339196fdc50dedf5f9439f5
Reviewed-on: https://go-review.googlesource.com/8452Reviewed-by: 's avatarAram Hăvărneanu <aram@mgk.ro>
Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
parent 65085188
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment