mirror of
https://github.com/creack/pty.git
synced 2026-03-31 02:27:08 +09:00
@@ -1,23 +0,0 @@
|
||||
# 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
|
||||
@@ -25,9 +25,9 @@ cross() {
|
||||
|
||||
set -e
|
||||
|
||||
cross linux amd64 386 arm arm64 ppc64 ppc64le s390x mips mipsle mips64 mips64le
|
||||
cross linux amd64 386 arm arm64 ppc64 ppc64le s390x mips mipsle mips64 mips64le riscv64
|
||||
cross darwin amd64 arm64
|
||||
cross freebsd amd64 386 arm arm64
|
||||
cross freebsd amd64 386 arm arm64 riscv64
|
||||
cross netbsd amd64 386 arm arm64
|
||||
cross openbsd amd64 386 arm arm64
|
||||
cross dragonfly amd64
|
||||
@@ -45,10 +45,6 @@ if ! hash docker; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo2 "Build for linux."
|
||||
echo2 " - linux/riscv"
|
||||
docker build -t creack-pty-test -f Dockerfile.riscv .
|
||||
|
||||
# Golang dropped support for darwin 32bits since go1.15. Make sure the lib still compile with go1.14 on those archs.
|
||||
echo2 "Build for darwin (32bits)."
|
||||
echo2 " - darwin/386"
|
||||
@@ -57,7 +53,6 @@ echo2 " - darwin/arm"
|
||||
docker build -t creack-pty-test -f Dockerfile.golang --build-arg=GOVERSION=1.14 --build-arg=GOOS=darwin --build-arg=GOARCH=arm .
|
||||
|
||||
# Run a single test for an old go version. Would be best with go1.0, but not available on Dockerhub.
|
||||
# Using 1.6 as it is the base version for the RISCV compiler.
|
||||
# Would also be better to run all the tests, not just one, need to refactor this file to allow for specifc archs per version.
|
||||
echo2 "Build for linux - go1.6."
|
||||
echo2 " - linux/amd64"
|
||||
|
||||
13
ztypes_freebsd_riscv64.go
Normal file
13
ztypes_freebsd_riscv64.go
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs types_freebsd.go
|
||||
|
||||
package pty
|
||||
|
||||
const (
|
||||
_C_SPECNAMELEN = 0x3f
|
||||
)
|
||||
|
||||
type fiodgnameArg struct {
|
||||
Len int32
|
||||
Buf *byte
|
||||
}
|
||||
Reference in New Issue
Block a user