mirror of
https://github.com/golang/go
synced 2024-11-13 16:00:21 -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")
|
fatalf("-buildmode=pie not supported by gccgo")
|
||||||
} else {
|
} else {
|
||||||
switch platform {
|
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":
|
"android/amd64", "android/arm", "android/arm64", "android/386":
|
||||||
codegenArg = "-shared"
|
codegenArg = "-shared"
|
||||||
default:
|
default:
|
||||||
@ -391,7 +391,7 @@ func buildModeInit() {
|
|||||||
codegenArg = "-fPIC"
|
codegenArg = "-fPIC"
|
||||||
} else {
|
} else {
|
||||||
switch platform {
|
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:
|
default:
|
||||||
fatalf("-buildmode=shared not supported on %s\n", platform)
|
fatalf("-buildmode=shared not supported on %s\n", platform)
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ func buildModeInit() {
|
|||||||
codegenArg = "-fPIC"
|
codegenArg = "-fPIC"
|
||||||
} else {
|
} else {
|
||||||
switch platform {
|
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")
|
buildAsmflags = append(buildAsmflags, "-D=GOBUILDMODE_shared=1")
|
||||||
default:
|
default:
|
||||||
fatalf("-linkshared not supported on %s\n", platform)
|
fatalf("-linkshared not supported on %s\n", platform)
|
||||||
@ -3025,6 +3025,8 @@ func (b *builder) gccArchArgs() []string {
|
|||||||
return []string{"-m64"}
|
return []string{"-m64"}
|
||||||
case "arm":
|
case "arm":
|
||||||
return []string{"-marm"} // not thumb
|
return []string{"-marm"} // not thumb
|
||||||
|
case "s390x":
|
||||||
|
return []string{"-m64", "-march=z196"}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user