Commit c99cfd93 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/link: don't use internal linking mode for cgo on PPC64

The internal linker doesn't know how to handle multiple TOC sections
in internal linking mode. This used to work because before CL 64793 we
invoked ld -r on multiple objects, and that merged the TOC sections
for us.

Updates #21961

Change-Id: I48260a7195be660016f2f358ebc8cb79652210ab
Reviewed-on: https://go-review.googlesource.com/66270
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarLynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 3fda3765
...@@ -190,7 +190,8 @@ func mustLinkExternal(ctxt *Link) (res bool, reason string) { ...@@ -190,7 +190,8 @@ func mustLinkExternal(ctxt *Link) (res bool, reason string) {
// Internally linking cgo is incomplete on some architectures. // Internally linking cgo is incomplete on some architectures.
// https://golang.org/issue/10373 // https://golang.org/issue/10373
// https://golang.org/issue/14449 // https://golang.org/issue/14449
if iscgo && SysArch.InFamily(sys.ARM64, sys.MIPS64, sys.MIPS) { // https://golang.org/issue/21961
if iscgo && SysArch.InFamily(sys.ARM64, sys.MIPS64, sys.MIPS, sys.PPC64) {
return true, objabi.GOARCH + " does not support internal cgo" return true, objabi.GOARCH + " does not support internal cgo"
} }
......
...@@ -17,7 +17,7 @@ func canInternalLink() bool { ...@@ -17,7 +17,7 @@ func canInternalLink() bool {
return false return false
case "linux": case "linux":
switch runtime.GOARCH { switch runtime.GOARCH {
case "arm64", "mips64", "mips64le", "mips", "mipsle": case "arm64", "mips64", "mips64le", "mips", "mipsle", "ppc64", "ppc64le":
return false return false
} }
} }
......
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