Commit b49c3ac2 authored by Dominik Vogt's avatar Dominik Vogt Committed by Ian Lance Taylor

cmd/cgo: add support for s390 and s390x

This patch was previously sent for review using hg:
golang.org/cl/173930043

Change-Id: I559a2f2ee07990d0c23d2580381e32f8e23077a5
Reviewed-on: https://go-review.googlesource.com/3033Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 0a24b8c7
...@@ -739,6 +739,10 @@ func (p *Package) gccMachine() []string { ...@@ -739,6 +739,10 @@ func (p *Package) gccMachine() []string {
return []string{"-m32"} return []string{"-m32"}
case "arm": case "arm":
return []string{"-marm"} // not thumb return []string{"-marm"} // not thumb
case "s390":
return []string{"-m31"}
case "s390x":
return []string{"-m64"}
} }
return nil return nil
} }
......
...@@ -135,6 +135,8 @@ var ptrSizeMap = map[string]int64{ ...@@ -135,6 +135,8 @@ var ptrSizeMap = map[string]int64{
"arm": 4, "arm": 4,
"ppc64": 8, "ppc64": 8,
"ppc64le": 8, "ppc64le": 8,
"s390": 4,
"s390x": 8,
} }
var intSizeMap = map[string]int64{ var intSizeMap = map[string]int64{
...@@ -143,6 +145,8 @@ var intSizeMap = map[string]int64{ ...@@ -143,6 +145,8 @@ var intSizeMap = map[string]int64{
"arm": 4, "arm": 4,
"ppc64": 8, "ppc64": 8,
"ppc64le": 8, "ppc64le": 8,
"s390": 4,
"s390x": 4,
} }
var cPrefix string var cPrefix string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment