]> Cypherpunks repositories - gostls13.git/commitdiff
go/build, runtime/internal/sys: reserve RISC-V arch names
authorTobias Klauser <tklauser@distanz.ch>
Wed, 11 Apr 2018 09:12:28 +0000 (11:12 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Wed, 11 Apr 2018 15:51:18 +0000 (15:51 +0000)
In #17528 it was discussed (off-topic to the actual issue) to reserve
GOARCH names for the RISC-V architecture. With the first RISC-V
Linux-capable development boards released (e.g. HiFive Unleashed),
Linux distributions being ported to RISC-V (e.g. Debian, Fedora) and
RISC-V support being added to gccgo (CL 96377), it becomes more likely
that Go software (and maybe Go itself) will be ported as well.

Add riscv and riscv64 (which is already used by gccgo), so Go 1.11 will
already recognize "*_riscv{,64}.go" as reserved files.

Change-Id: I042aab19c68751d82ea513e40f7b1d7e1ad924ea
Reviewed-on: https://go-review.googlesource.com/106256
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
24 files changed:
src/go/build/syslist.go
src/runtime/internal/sys/zgoarch_386.go
src/runtime/internal/sys/zgoarch_amd64.go
src/runtime/internal/sys/zgoarch_amd64p32.go
src/runtime/internal/sys/zgoarch_arm.go
src/runtime/internal/sys/zgoarch_arm64.go
src/runtime/internal/sys/zgoarch_arm64be.go
src/runtime/internal/sys/zgoarch_armbe.go
src/runtime/internal/sys/zgoarch_mips.go
src/runtime/internal/sys/zgoarch_mips64.go
src/runtime/internal/sys/zgoarch_mips64le.go
src/runtime/internal/sys/zgoarch_mips64p32.go
src/runtime/internal/sys/zgoarch_mips64p32le.go
src/runtime/internal/sys/zgoarch_mipsle.go
src/runtime/internal/sys/zgoarch_ppc.go
src/runtime/internal/sys/zgoarch_ppc64.go
src/runtime/internal/sys/zgoarch_ppc64le.go
src/runtime/internal/sys/zgoarch_riscv.go [new file with mode: 0644]
src/runtime/internal/sys/zgoarch_riscv64.go [new file with mode: 0644]
src/runtime/internal/sys/zgoarch_s390.go
src/runtime/internal/sys/zgoarch_s390x.go
src/runtime/internal/sys/zgoarch_sparc.go
src/runtime/internal/sys/zgoarch_sparc64.go
src/runtime/internal/sys/zgoarch_wasm.go

index d1fcc8f5bd5b6a10893902e19ba9db12f019ed50..d7938fad54f9623a586f76d53e3929a02077c45a 100644 (file)
@@ -5,4 +5,4 @@
 package build
 
 const goosList = "android darwin dragonfly freebsd js linux nacl netbsd openbsd plan9 solaris windows zos "
-const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64 wasm "
+const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x sparc sparc64 wasm "
index 209b7749f6d20b7cf1936222b9cf8450969550c4..c286d0df2b36eaf0556872d593f02a19fac6ca3e 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 950a196786c2b01d8e146e398afbacc5b75139dd..d21c1d7d2a777420530370846529d3ca90f66495 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 0d27361471f171541dfeb2c7bf6886c5bd3954c9..13dc2e756d60aed52d3c36c2f23eca4b21a9a625 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 46f7fb880faa7287a11cbb085b47385aaba61e7e..9085fb0ea84f187197b40cb2994c5f947c81f473 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 67893f99cc869ffdcb2a7af8d05a66456db6fe6a..ed7ef2ebcb376f3502d55b22ff1be8ac98d1082c 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 0a9451f38899b030b6ccf7912380b275c5eca8b4..faf31110535a27b4b3a1af7ab5b0d42d539e0723 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 84cc570ec86c520364f590fd53fcf127d116bb4a..cb28301e0befdae58547cb554ae26a5a9e43091b 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 6ff4b24fcfd25cceb419f90e7c346c2d68446edf..315dea1c846ea4850d4c940386dbdca3cbf62301 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 55a8b860a58aaa321d317b50ddd9b852686a9ae2..5258cbfbe70bf12c9723f1e9a5e1cd71f53c51ad 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index ea0d94a39e2242b30ff218b181e281e013f52361..1721698518f1cc3b1e15aee8ec734862d6556e7e 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 1
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index fe0b9f6bf11995a963bf9b3e16f88178ec921206..44c4624da91558faa05c130b1c01be18bdfd00aa 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 1
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 273e2249739522d2ee78a092373caccbd95e7edd..eb63225430dfa97abfdedeb137dad0c24b9bfea7 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 1
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 802d1ecd4f9513bd0a505f93694ed7995f80145d..e0ebfbf0385a1aa0289a471416095525dd1fa280 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index ca241304584f0ed72bbfec415881b9b6b3aee24c..ef26aa3201144cfbfc5ff4ff32ff5abe55b75c45 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 1
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index e307121cd8743610dca5768f1a27077b02dca0ed..32c2d46d4c9fc629dc73fd35de378ea6ef762d2e 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index afc67c59a39be21d9560d1e3b433fb5ac61e97d9..3a6e56763c01ade03483cd20c4204c6a66b099dc 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
diff --git a/src/runtime/internal/sys/zgoarch_riscv.go b/src/runtime/internal/sys/zgoarch_riscv.go
new file mode 100644 (file)
index 0000000..d8f6b49
--- /dev/null
@@ -0,0 +1,31 @@
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
+
+// +build riscv
+
+package sys
+
+const GOARCH = `riscv`
+
+const Goarch386 = 0
+const GoarchAmd64 = 0
+const GoarchAmd64p32 = 0
+const GoarchArm = 0
+const GoarchArmbe = 0
+const GoarchArm64 = 0
+const GoarchArm64be = 0
+const GoarchPpc64 = 0
+const GoarchPpc64le = 0
+const GoarchMips = 0
+const GoarchMipsle = 0
+const GoarchMips64 = 0
+const GoarchMips64le = 0
+const GoarchMips64p32 = 0
+const GoarchMips64p32le = 0
+const GoarchPpc = 0
+const GoarchRiscv = 1
+const GoarchRiscv64 = 0
+const GoarchS390 = 0
+const GoarchS390x = 0
+const GoarchSparc = 0
+const GoarchSparc64 = 0
+const GoarchWasm = 0
diff --git a/src/runtime/internal/sys/zgoarch_riscv64.go b/src/runtime/internal/sys/zgoarch_riscv64.go
new file mode 100644 (file)
index 0000000..0ba843b
--- /dev/null
@@ -0,0 +1,31 @@
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
+
+// +build riscv64
+
+package sys
+
+const GOARCH = `riscv64`
+
+const Goarch386 = 0
+const GoarchAmd64 = 0
+const GoarchAmd64p32 = 0
+const GoarchArm = 0
+const GoarchArmbe = 0
+const GoarchArm64 = 0
+const GoarchArm64be = 0
+const GoarchPpc64 = 0
+const GoarchPpc64le = 0
+const GoarchMips = 0
+const GoarchMipsle = 0
+const GoarchMips64 = 0
+const GoarchMips64le = 0
+const GoarchMips64p32 = 0
+const GoarchMips64p32le = 0
+const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 1
+const GoarchS390 = 0
+const GoarchS390x = 0
+const GoarchSparc = 0
+const GoarchSparc64 = 0
+const GoarchWasm = 0
index 1f4a1c262b79da7a8ae1f65d5616cd8be4870a52..20a1b234a6501a6b74e7c6cdeee2ad3745de4e81 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 1
 const GoarchS390x = 0
 const GoarchSparc = 0
index 13fdd2314f2398f5ca4500390ea058e1347c2e34..ffdda0c827afd7a6cb232595ec55bca509f6848b 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 1
 const GoarchSparc = 0
index 825d013f93e61ea04ea5edd3f12882972a563cad..b4949510d54901dd011180e78025df2e1560e59c 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 1
index 939c56f2d36f6e6d1382e24aa5e169e78885b7fe..0f6df411ce8d7f462395ed16e35de233d3f3189e 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0
index 20a22414d0040aaaa90bd3496c92cd1d4a76533a..e69afb0cb3a0a38be9d511465e127cfc33c0f1a1 100644 (file)
@@ -22,6 +22,8 @@ const GoarchMips64le = 0
 const GoarchMips64p32 = 0
 const GoarchMips64p32le = 0
 const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
 const GoarchS390 = 0
 const GoarchS390x = 0
 const GoarchSparc = 0