From 3334eee400ad4dc202f53d3efa34fddb013f9c17 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 30 Apr 2018 09:02:14 +0200 Subject: [PATCH] cmd/cgo: add support for GOARCH=riscv64 Even though GOARCH=riscv64 is not supported by gc yet, it is easy to make cmd/cgo already support it. Together with the changes in debug/elf in CL 107339 this e.g. allows to generate Go type definitions for linux/riscv64 in the golang.org/x/sys/unix package without using gccgo. Change-Id: I6b849df2ddac56c8c483eb03d56009669ca36973 Reviewed-on: https://go-review.googlesource.com/110066 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/cmd/cgo/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/cgo/main.go b/src/cmd/cgo/main.go index b992f6fae19..ce20948cbec 100644 --- a/src/cmd/cgo/main.go +++ b/src/cmd/cgo/main.go @@ -163,6 +163,7 @@ var ptrSizeMap = map[string]int64{ "mips64le": 8, "ppc64": 8, "ppc64le": 8, + "riscv64": 8, "s390": 4, "s390x": 8, "sparc64": 8, @@ -179,6 +180,7 @@ var intSizeMap = map[string]int64{ "mips64le": 8, "ppc64": 8, "ppc64le": 8, + "riscv64": 8, "s390": 4, "s390x": 8, "sparc64": 8,