File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
docker/riscv64gc-unknown-linux-gnu Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,8 @@ jobs:
168
168
os : ubuntu-latest
169
169
- target : thumbv7em-none-eabihf
170
170
os : ubuntu-latest
171
+ - target : riscv64gc-unknown-linux-gnu
172
+ os : ubuntu-latest
171
173
172
174
steps :
173
175
- uses : actions/checkout@master
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:21.10
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ gcc libc6-dev qemu-user ca-certificates \
5
+ gcc-riscv64-linux-gnu libc6-dev-riscv64-cross \
6
+ qemu-user
7
+
8
+ ENV CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc \
9
+ CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER="qemu-riscv64 -L /usr/riscv64-linux-gnu" \
10
+ OBJDUMP=riscv64-linux-gnu-objdump
Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ case ${TARGET} in
44
44
export RUSTFLAGS=" ${RUSTFLAGS} -Ctarget-feature=+neon"
45
45
export TARGET_CFLAGS=" -mfpu=vfpv3-d16"
46
46
;;
47
+ # Some of our test dependencies use the deprecated `gcc` crates which
48
+ # doesn't detect RISC-V compilers automatically, so do it manually here.
49
+ riscv64* )
50
+ export TARGET_CC=" riscv64-linux-gnu-gcc"
51
+ ;;
47
52
esac
48
53
49
54
echo " RUSTFLAGS=${RUSTFLAGS} "
You can’t perform that action at this time.
0 commit comments