File tree Expand file tree Collapse file tree 7 files changed +23
-1
lines changed
docker/riscv64gc-unknown-linux-gnu Expand file tree Collapse file tree 7 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ system.
56
56
| armv7-linux-androideabi | Yes | Two | No | No |
57
57
| i686-linux-android | Yes | Two | No | No |
58
58
| x86_64-linux-android | Yes | Two | No | No |
59
+ | riscv64gc-unknown-linux-gnu | Yes | --- | No | No |
59
60
| ----------------------------- | ---------- | ----- | ------ | ---------- |
60
61
| x86_64-apple-darwin | No | One | Yes | Yes |
61
62
| ----------------------------- | ---------- | ----- | ------ | ---------- |
Original file line number Diff line number Diff line change 46
46
- armv7-linux-androideabi # skip-pr skip-master
47
47
- i686-linux-android # skip-pr skip-master
48
48
- x86_64-linux-android # skip-pr skip-master
49
+ - riscv64gc-unknown-linux-gnu # skip-pr skip-master skip-stable
49
50
include :
50
51
- target : x86_64-unknown-linux-gnu
51
52
run_tests : YES
Original file line number Diff line number Diff line change
1
+ FROM rust-riscv64gc-unknown-linux-gnu
2
+
3
+
4
+ # We install a stable toolchain using rustup anyway, this should stop us getting
5
+ # confused and still having this toolchain in $PATH
6
+ RUN /usr/local/lib/rustlib/uninstall.sh
7
+ # Weirdly that doesn't remove these:
8
+ RUN rm /usr/local/bin/cargo /usr/local/bin/rust*
9
+
10
+ ENV CC_riscv64gc_unknown_linux_gnu=riscv64-unknown-linux-gnu-gcc \
11
+ CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-unknown-linux-gnu-gcc
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ case "$TARGET" in
32
32
x86_64-unknown-freebsd) image=dist-x86_64-freebsd ;;
33
33
x86_64-unknown-linux-gnu) image=dist-x86_64-linux ;;
34
34
x86_64-unknown-netbsd) image=dist-x86_64-netbsd ;;
35
+ riscv64gc-unknown-linux-gnu) image=dist-various-1 ;;
35
36
* ) exit ;;
36
37
esac
37
38
Original file line number Diff line number Diff line change @@ -295,7 +295,9 @@ get_architecture() {
295
295
s390x)
296
296
_cputype=s390x
297
297
;;
298
-
298
+ riscv64)
299
+ _cputype=riscv64gc
300
+ ;;
299
301
* )
300
302
err " unknown CPU type: $_cputype "
301
303
@@ -321,6 +323,9 @@ get_architecture() {
321
323
_ostype=" ${_ostype} eabihf"
322
324
fi
323
325
;;
326
+ riscv64gc)
327
+ err " riscv64 with 32-bit userland unsupported"
328
+ ;;
324
329
esac
325
330
fi
326
331
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ static LIST_ARCHS: &[&str] = &[
90
90
"powerpc" ,
91
91
"powerpc64" ,
92
92
"powerpc64le" ,
93
+ "riscv64gc" ,
93
94
"s390x" ,
94
95
] ;
95
96
static LIST_OSES : & [ & str ] = & [
Original file line number Diff line number Diff line change @@ -980,6 +980,8 @@ pub fn this_host_triple() -> String {
980
980
"i686"
981
981
} else if cfg ! ( target_arch = "x86_64" ) {
982
982
"x86_64"
983
+ } else if cfg ! ( target_arch = "riscv64" ) {
984
+ "riscv64gc"
983
985
} else {
984
986
unimplemented ! ( )
985
987
} ;
You can’t perform that action at this time.
0 commit comments