about summary refs log tree commit diff
diff options
context:
space:
mode:
authorzhongyao <chen.zhongyao@zte.com.cn>2025-08-08 14:42:51 +0800
committerZhongyao Chen <chen.zhongyao@zte.com.cn>2025-08-11 21:09:05 +0000
commit93a8c1d12cee1af04d84ffc59597dbd877de671f (patch)
tree8af76b978f4944e16d18b113ca488bc6cb1e0fea
parent31ae666f0f57a5fefd924a9945e5aca816c001f8 (diff)
downloadrust-93a8c1d12cee1af04d84ffc59597dbd877de671f.tar.gz
rust-93a8c1d12cee1af04d84ffc59597dbd877de671f.zip
Update src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
-rw-r--r--src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md b/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md
index 00790ba197f..6db4a672936 100644
--- a/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md
+++ b/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md
@@ -2,10 +2,9 @@
 
 **Tier: 3**
 
-RISC-V targets using the ratified [RVA23 Profile](https://github.com/riscv/riscv-profiles/blob/main/rva23-profile.adoc).
+RISC-V target using the ratified [RVA23 Profile](https://github.com/riscv/riscv-profiles/blob/main/src/rva23-profile.adoc).
 This target will enable all mandary features of rva23u64 and rva23s64 by default.
 
-
 ## Target maintainers
 
 [@ZhongyaoChen](https://github.com/ZhongyaoChen)
@@ -18,13 +17,11 @@ This target requires:
 * Linux Kernel version 4.20 or later
 * glibc 2.17 or later
 
-
 ## Building the target
 
-The target is distributed through `rustup`, and otherwise require no
-special configuration.
+Tier-3 target is not distributed through `rustup`.
 
-If you need to build your own Rust for some reason though, the target can be build with:
+You need to build your own Rust, the target can be build with:
 
 ```bash
 ./x build --target riscv64a23-unknown-linux-gnu
@@ -32,35 +29,14 @@ If you need to build your own Rust for some reason though, the target can be bui
 
 ## Building Rust programs
 
-Add the target:
+Add the toolchain:
 
 ```bash
-rustup target add riscv64a23-unknown-linux-gnu
+rustup toolchain link rva23-toolchain {path-to-rust}/build/host/stage2
 ```
 
 Then cross compile crates with:
 
 ```bash
-cargo build --target riscv64a23-unknown-linux-gnu
-```
-
-## Cross-compilation toolchains and Testing
-
-On Ubuntu 24.04, we can install compilation dependencies with:
-
-```bash
-apt install -y git python3 g++ g++-riscv64-linux-gnu
-```
-
-Then build target with:
-
-```bash
-./x build --target=riscv64a23-unknown-linux-gnu
-```
-
-There are no special requirements for testing and running the targets.
-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.
-
-```bash
-DEPLOY=1 ./src/ci/docker/run.sh riscv64a23-gnu
+RUSTFLAGS="-C linker=riscv64-linux-gnu-gcc" cargo +rva23-toolchain build --target=riscv64a23-unknown-linux-gnu
 ```