Commit bed88f4e authored by Clément Chigot's avatar Clément Chigot Committed by Brad Fitzpatrick

cmd/link: fix error messages for external linking on ppc64

This commit fixes error messages displayed on aix/ppc64 with external
linking.

Change-Id: I5311d36f30394be717827891e070db249482814a
Reviewed-on: https://go-review.googlesource.com/c/151041Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent e4535772
...@@ -248,7 +248,7 @@ func determineLinkMode(ctxt *Link) { ...@@ -248,7 +248,7 @@ func determineLinkMode(ctxt *Link) {
ctxt.LinkMode = LinkInternal ctxt.LinkMode = LinkInternal
case "1": case "1":
if objabi.GOARCH == "ppc64" { if objabi.GOARCH == "ppc64" {
Exitf("external linking requested via GO_EXTLINK_ENABLED but not supported for linux/ppc64") Exitf("external linking requested via GO_EXTLINK_ENABLED but not supported for %s/ppc64", objabi.GOOS)
} }
ctxt.LinkMode = LinkExternal ctxt.LinkMode = LinkExternal
default: default:
...@@ -262,7 +262,7 @@ func determineLinkMode(ctxt *Link) { ...@@ -262,7 +262,7 @@ func determineLinkMode(ctxt *Link) {
ctxt.LinkMode = LinkInternal ctxt.LinkMode = LinkInternal
} }
if objabi.GOARCH == "ppc64" && ctxt.LinkMode == LinkExternal { if objabi.GOARCH == "ppc64" && ctxt.LinkMode == LinkExternal {
Exitf("external linking is not supported for linux/ppc64") Exitf("external linking is not supported for %s/ppc64", objabi.GOOS)
} }
} }
case LinkInternal: case LinkInternal:
...@@ -271,7 +271,7 @@ func determineLinkMode(ctxt *Link) { ...@@ -271,7 +271,7 @@ func determineLinkMode(ctxt *Link) {
} }
case LinkExternal: case LinkExternal:
if objabi.GOARCH == "ppc64" { if objabi.GOARCH == "ppc64" {
Exitf("external linking not supported for linux/ppc64") Exitf("external linking not supported for %s/ppc64", objabi.GOOS)
} }
} }
} }
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