mirror of https://github.com/golang/go.git
[release-branch.go1.15] cmd/cgo: add more architectures to size maps
This brings over the architectures that the gofrontend knows about.
This permits using the main cgo tool for those architectures,
as cgo can be used with -godefs without gc support.
This will help add golang.org/x/sys/unix support for other architectures.
For #37443
Fixes #41871
Change-Id: I63632b9c5139e71b9ccab8edcc7acdb464229b74
Reviewed-on: https://go-review.googlesource.com/c/go/+/260657
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
(cherry picked from commit 5d1378143b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/260702
This commit is contained in:
parent
af06e65910
commit
2c2e11f345
|
|
@ -169,35 +169,51 @@ func usage() {
|
|||
|
||||
var ptrSizeMap = map[string]int64{
|
||||
"386": 4,
|
||||
"alpha": 8,
|
||||
"amd64": 8,
|
||||
"arm": 4,
|
||||
"arm64": 8,
|
||||
"m68k": 4,
|
||||
"mips": 4,
|
||||
"mipsle": 4,
|
||||
"mips64": 8,
|
||||
"mips64le": 8,
|
||||
"nios2": 4,
|
||||
"ppc": 4,
|
||||
"ppc64": 8,
|
||||
"ppc64le": 8,
|
||||
"riscv": 4,
|
||||
"riscv64": 8,
|
||||
"s390": 4,
|
||||
"s390x": 8,
|
||||
"sh": 4,
|
||||
"shbe": 4,
|
||||
"sparc": 4,
|
||||
"sparc64": 8,
|
||||
}
|
||||
|
||||
var intSizeMap = map[string]int64{
|
||||
"386": 4,
|
||||
"alpha": 8,
|
||||
"amd64": 8,
|
||||
"arm": 4,
|
||||
"arm64": 8,
|
||||
"m68k": 4,
|
||||
"mips": 4,
|
||||
"mipsle": 4,
|
||||
"mips64": 8,
|
||||
"mips64le": 8,
|
||||
"nios2": 4,
|
||||
"ppc": 4,
|
||||
"ppc64": 8,
|
||||
"ppc64le": 8,
|
||||
"riscv": 4,
|
||||
"riscv64": 8,
|
||||
"s390": 4,
|
||||
"s390x": 8,
|
||||
"sh": 4,
|
||||
"shbe": 4,
|
||||
"sparc": 4,
|
||||
"sparc64": 8,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue