2
2
3
3
** Tier: 3**
4
4
5
- RISC-V targets using the ratified [ RVA23 Profile] ( https://github.com/riscv/riscv-profiles/blob/main/rva23-profile.adoc ) .
5
+ RISC-V target using the ratified [ RVA23 Profile] ( https://github.com/riscv/riscv-profiles/blob/main/src /rva23-profile.adoc ) .
6
6
This target will enable all mandary features of rva23u64 and rva23s64 by default.
7
7
8
-
9
8
## Target maintainers
10
9
11
10
[ @ZhongyaoChen ] ( https://github.com/ZhongyaoChen )
@@ -18,49 +17,26 @@ This target requires:
18
17
* Linux Kernel version 4.20 or later
19
18
* glibc 2.17 or later
20
19
21
-
22
20
## Building the target
23
21
24
- The target is distributed through ` rustup ` , and otherwise require no
25
- special configuration.
22
+ Tier-3 target is not distributed through ` rustup ` .
26
23
27
- If you need to build your own Rust for some reason though , the target can be build with:
24
+ You need to build your own Rust, the target can be build with:
28
25
29
26
``` bash
30
27
./x build --target riscv64a23-unknown-linux-gnu
31
28
```
32
29
33
30
## Building Rust programs
34
31
35
- Add the target :
32
+ Add the toolchain :
36
33
37
34
``` bash
38
- rustup target add riscv64a23-unknown-linux-gnu
35
+ rustup toolchain link rva23-toolchain {path-to-rust}/build/host/stage2
39
36
```
40
37
41
38
Then cross compile crates with:
42
39
43
40
``` bash
44
- cargo build --target riscv64a23-unknown-linux-gnu
45
- ```
46
-
47
- ## Cross-compilation toolchains and Testing
48
-
49
- On Ubuntu 24.04, we can install compilation dependencies with:
50
-
51
- ``` bash
52
- apt install -y git python3 g++ g++-riscv64-linux-gnu
53
- ```
54
-
55
- Then build target with:
56
-
57
- ``` bash
58
- ./x build --target=riscv64a23-unknown-linux-gnu
59
- ```
60
-
61
- There are no special requirements for testing and running the targets.
62
- For testing cross-builds on the host, you can use the docker image. It will automatically set up a RISC-V QEMU emulator and run all the test suite.
63
-
64
- ``` bash
65
- DEPLOY=1 ./src/ci/docker/run.sh riscv64a23-gnu
41
+ RUSTFLAGS=" -C linker=riscv64-linux-gnu-gcc" cargo +rva23-toolchain build --target=riscv64a23-unknown-linux-gnu
66
42
```
0 commit comments