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 00790ba197f1..6db4a6729368 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 ```