1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:54:43 -07:00

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/3033
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Dominik Vogt 2015-01-13 12:36:44 +01:00 committed by Ian Lance Taylor
parent 0a24b8c776
commit b49c3ac2d5
2 changed files with 8 additions and 0 deletions

View File

@ -739,6 +739,10 @@ func (p *Package) gccMachine() []string {
return []string{"-m32"}
case "arm":
return []string{"-marm"} // not thumb
case "s390":
return []string{"-m31"}
case "s390x":
return []string{"-m64"}
}
return nil
}

View File

@ -135,6 +135,8 @@ var ptrSizeMap = map[string]int64{
"arm": 4,
"ppc64": 8,
"ppc64le": 8,
"s390": 4,
"s390x": 8,
}
var intSizeMap = map[string]int64{
@ -143,6 +145,8 @@ var intSizeMap = map[string]int64{
"arm": 4,
"ppc64": 8,
"ppc64le": 8,
"s390": 4,
"s390x": 4,
}
var cPrefix string