mirror of
https://github.com/golang/go
synced 2024-11-12 01:00:22 -07:00
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>
This commit is contained in:
parent
f226e886c2
commit
254d63baa7
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user