Created
March 21, 2019 09:18
-
-
Save zeldin/f99a856c49563650e90e3911eed4be39 to your computer and use it in GitHub Desktop.
golang patch to enable external linking on ppc64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go | |
index 60b6491859..2d8f96408e 100644 | |
--- a/src/cmd/link/internal/ld/config.go | |
+++ b/src/cmd/link/internal/ld/config.go | |
@@ -247,9 +247,6 @@ 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 %s/ppc64", objabi.GOOS) | |
- } | |
ctxt.LinkMode = LinkExternal | |
default: | |
if needed, _ := mustLinkExternal(ctxt); needed { | |
@@ -261,17 +258,10 @@ func determineLinkMode(ctxt *Link) { | |
} else { | |
ctxt.LinkMode = LinkInternal | |
} | |
- if objabi.GOARCH == "ppc64" && ctxt.LinkMode == LinkExternal { | |
- Exitf("external linking is not supported for %s/ppc64", objabi.GOOS) | |
- } | |
} | |
case LinkInternal: | |
if needed, reason := mustLinkExternal(ctxt); needed { | |
Exitf("internal linking requested but external linking required: %s", reason) | |
} | |
- case LinkExternal: | |
- if objabi.GOARCH == "ppc64" { | |
- Exitf("external linking not supported for %s/ppc64", objabi.GOOS) | |
- } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment