-
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# NOTE: Using 1.13 as a base to build the RISCV compiler, the resulting version is based on go1.6. | ||
FROM golang:1.13 | ||
|
||
# Clone and complie a riscv compatible version of the go compiler. | ||
RUN git clone https://review.gerrithub.io/riscv/riscv-go /riscv-go | ||
# riscvdev branch HEAD as of 2019-06-29. | ||
RUN cd /riscv-go && git checkout 04885fddd096d09d4450726064d06dd107e374bf | ||
ENV PATH=/riscv-go/misc/riscv:/riscv-go/bin:$PATH | ||
RUN cd /riscv-go/src && GOROOT_BOOTSTRAP=$(go env GOROOT) ./make.bash | ||
ENV GOROOT=/riscv-go | ||
|
||
# Set the base env. | ||
ENV GOOS=linux GOARCH=riscv CGO_ENABLED=0 GOFLAGS='-v -ldflags=-s -ldflags=-w' | ||
|
||
# Pre compile the stdlib. | ||
RUN go build -a std | ||
|
||
# Add the code to the image. | ||
WORKDIR pty | ||
ADD . . | ||
|
||
# Build the lib. | ||
RUN go build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters