From bcc5c6aa502f3efda253a8e1f6680a6aab7ca966 Mon Sep 17 00:00:00 2001 From: Hyang-Ah Hana Kim Date: Tue, 20 Oct 2015 00:24:03 -0400 Subject: [PATCH] cmd/go: allow -buildmode=pie for android/amd64. For golang/go#10743 golang/go#10807 Change-Id: I35dedb52e2b47fe7ffc655d01f22ac05fe830bde Reviewed-on: https://go-review.googlesource.com/16396 Reviewed-by: David Crawshaw --- src/cmd/go/build.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index 285627288a42c0..966603ec08354d 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -361,7 +361,7 @@ func buildModeInit() { ldBuildmode = "c-shared" case "default": switch platform { - case "android/arm": + case "android/arm", "android/amd64": codegenArg = "-shared" ldBuildmode = "pie" default: @@ -375,7 +375,7 @@ func buildModeInit() { fatalf("-buildmode=pie not supported by gccgo") } else { switch platform { - case "android/arm", "linux/amd64": + case "android/arm", "linux/amd64", "android/amd64": codegenArg = "-shared" default: fatalf("-buildmode=pie not supported on %s\n", platform)