The Go Programming Language
RISC-V Go Port
This repository is home of the RISC-V port of the Go programming language.
The upstream Go project can be found at https://github.com/golang/go.
This port has been upstreamed in Go 1.14. Please refer to upstream for all RISC-V development. This repository is outdated and archived.
$ git clone https://review.gerrithub.io/riscv/riscv-go riscv-go $ cd riscv-go $ git checkout riscvdev # RISC-V work happens on this branch $ export GOROOT_BOOTSTRAP=/path/to/prebuilt/go/tree $ export PATH="$(pwd)/misc/riscv:$(pwd)/bin:$PATH" $ cd src $ ./make.bash
Compile and run in qemu-riscv64 (which is expected to be in PATH):
$ GOARCH=riscv GOOS=linux go run ../riscvtest/add.go
$ GOARCH=riscv GOOS=linux go build ../riscvtest/add.go
Our basic tests are in the
$ cd ../riscvtest $ go run run.go
If this exits without error, all is well!
Spike plus pk support only a small subset of Linux syscalls and will not be capable of supporting the full Go runtime.
All contributors must sign the upstream Contributor License Agreement, as this port will be merged into upstream Go upon completion.
Code review occurs via our GerritHub project, rather than via GitHub Pull Requests.
The upstream contribution guidelines
include a basic overview of using Gerrit. While the upstream Go Gerrit server
is different from ours,
codereview.cfg will configure
send CLs to GerritHub.