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/151041
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Clément Chigot 2018-11-23 15:16:18 +01:00 committed by Brad Fitzpatrick
parent e4535772ca
commit bed88f4e81

View file

@ -248,7 +248,7 @@ func determineLinkMode(ctxt *Link) {
ctxt.LinkMode = LinkInternal
case "1":
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
default:
@ -262,7 +262,7 @@ func determineLinkMode(ctxt *Link) {
ctxt.LinkMode = LinkInternal
}
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:
@ -271,7 +271,7 @@ func determineLinkMode(ctxt *Link) {
}
case LinkExternal:
if objabi.GOARCH == "ppc64" {
Exitf("external linking not supported for linux/ppc64")
Exitf("external linking not supported for %s/ppc64", objabi.GOOS)
}
}
}