diff options
| author | Michael Munday <munday@ca.ibm.com> | 2016-03-18 17:14:23 -0400 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-21 08:51:21 +0000 |
| commit | 254d63baa78741fe415e58361ddc3e10a311458c (patch) | |
| tree | 0d444f83e0008092046053a13afd317bae197195 /src | |
| parent | f226e886c2b3e0fc0cb8fad8401d1ff8d006df58 (diff) | |
| download | go-254d63baa78741fe415e58361ddc3e10a311458c.tar.xz | |
cmd/go: add s390x support
Minimum architecture of z196 required so that GCC can assemble
gcc_s390x.S in runtime/cgo.
Change-Id: I603ed2edd39f826fb8193740ece5bd11d18c3dc5
Reviewed-on: https://go-review.googlesource.com/20876
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/go/build.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index 3f9537834c..6a43e60219 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -377,7 +377,7 @@ func buildModeInit() { fatalf("-buildmode=pie not supported by gccgo") } else { switch platform { - case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", + case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x", "android/amd64", "android/arm", "android/arm64", "android/386": codegenArg = "-shared" default: @@ -391,7 +391,7 @@ func buildModeInit() { codegenArg = "-fPIC" } else { switch platform { - case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le": + case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x": default: fatalf("-buildmode=shared not supported on %s\n", platform) } @@ -409,7 +409,7 @@ func buildModeInit() { codegenArg = "-fPIC" } else { switch platform { - case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le": + case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x": buildAsmflags = append(buildAsmflags, "-D=GOBUILDMODE_shared=1") default: fatalf("-linkshared not supported on %s\n", platform) @@ -3025,6 +3025,8 @@ func (b *builder) gccArchArgs() []string { return []string{"-m64"} case "arm": return []string{"-marm"} // not thumb + case "s390x": + return []string{"-m64", "-march=z196"} } return nil } |
