unix: add support for linux/riscv64

Add syscall wrappers, error constants and types for linux/riscv64

Switch docker image to Ubuntu 18.10 in order to get qemu supporting
riscv64. Also set the uname release string for qemu to 4.15 (the first
Linux kernel version with riscv64 support), because otherwise running
the generating C program in mkerrors.sh on a host with an older kernel
would fail with a "FATAL: kernel too old".

Note that linux/riscv64 is currently only usable using gccgo.

Updates golang/go#27532

Change-Id: Ic420f842342418443474cac72d38adff14d1b938
Reviewed-on: https://go-review.googlesource.com/133735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser
2018-09-06 13:30:57 +00:00
committed by Tobias Klauser
parent ebe1bf3edb
commit 8cf3aee429
7 changed files with 7164 additions and 4 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:18.10
# Dependencies to get the git sources and go binaries
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -33,7 +33,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
bison gawk make python \
gcc gcc-multilib \
gettext texinfo \
qemu \
qemu-user \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Cross compilers (install recommended packages to get cross libc-dev)
@@ -42,6 +42,7 @@ RUN apt-get update && apt-get install -y \
gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \
gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \
gcc-powerpc64-linux-gnu gcc-powerpc64le-linux-gnu \
gcc-riscv64-linux-gnu \
gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*