github.com/riscv/riscv-go@v0.0.0-20200123204226-124ebd6fcc8e/README.md (about) 1 # The Go Programming Language 2 3 ## RISC-V Go Port 4 5 This repository is home of the RISC-V port of the Go programming language. 6 7 The upstream Go project can be found at https://github.com/golang/go. 8 9 **This port has been upstreamed in Go 1.14. Please refer to upstream for all 10 RISC-V development. This repository is outdated and archived.** 11 12 ### Quick Start 13 14 Setup: 15 16 ```sh 17 $ git clone https://review.gerrithub.io/riscv/riscv-go riscv-go 18 $ cd riscv-go 19 $ git checkout riscvdev # RISC-V work happens on this branch 20 $ export GOROOT_BOOTSTRAP=/path/to/prebuilt/go/tree 21 $ export PATH="$(pwd)/misc/riscv:$(pwd)/bin:$PATH" 22 $ cd src 23 $ ./make.bash 24 ``` 25 26 Compile and run in qemu-riscv64 (which is expected to be in PATH): 27 28 ```sh 29 $ GOARCH=riscv GOOS=linux go run ../riscvtest/add.go 30 ``` 31 32 Build: 33 34 ```sh 35 $ GOARCH=riscv GOOS=linux go build ../riscvtest/add.go 36 ``` 37 38 Test: 39 40 Our basic tests are in the `riscvtest` directory: 41 42 ```sh 43 $ cd ../riscvtest 44 $ go run run.go 45 ``` 46 47 If this exits without error, all is well! 48 49 ### QEMU 50 51 Spike plus pk support only a small subset of Linux syscalls and will not be 52 capable of supporting the full Go runtime. 53 54 The [RISC-V QEMU port](https://github.com/riscv/riscv-qemu) supports a much 55 wider set of syscalls with its "User Mode Simulation". See [Method 56 2](https://github.com/riscv/riscv-qemu#method-2a-fedora-24-userland-with-user-mode-simulation-recommended) 57 in the QEMU README for instructions. 58 59 ### Contributing 60 61 All contributors must sign the upstream [Contributor License 62 Agreement](https://golang.org/doc/contribute.html#cla), as this port will be 63 merged into upstream Go upon completion. 64 65 Code review occurs via our 66 [GerritHub](https://review.gerrithub.io/#/admin/projects/riscv/riscv-go) 67 project, rather than via GitHub Pull Requests. 68 69 The upstream [contribution guidelines](https://golang.org/doc/contribute.html) 70 include a basic overview of using Gerrit. While the upstream Go Gerrit server 71 is different from ours, `codereview.cfg` will configure `git-codereview` to 72 send CLs to GerritHub.