From bed88f4e81013433ff47fb2661a329530b57ede6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <clement.chigot@atos.net>
Date: Fri, 23 Nov 2018 15:16:18 +0100
Subject: [PATCH] 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>
---
 src/cmd/link/internal/ld/config.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go
index 2f6dd7a7e2..60b6491859 100644
--- a/src/cmd/link/internal/ld/config.go
+++ b/src/cmd/link/internal/ld/config.go
@@ -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)
 		}
 	}
 }
-- 
2.30.9