forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#122049 - Amanieu:riscv64-musl-tier2, r=Mark…
…-Simulacrum Promote riscv64gc-unknown-linux-musl to tier 2
- Loading branch information
Showing
6 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/doc/rustc/src/platform-support/riscv64gc-unknown-linux-musl.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# riscv64gc-unknown-linux-musl | ||
|
||
**Tier: 2** | ||
|
||
Target for RISC-V Linux programs using musl libc. | ||
|
||
## Target maintainers | ||
|
||
- [@Amanieu](https://github.com/Amanieu) | ||
- [@kraj](https://github.com/kraj) | ||
|
||
## Requirements | ||
|
||
Building the target itself requires a RISC-V compiler that is supported by `cc-rs`. | ||
|
||
## Building the target | ||
|
||
The target can be built by enabling it for a `rustc` build. | ||
|
||
```toml | ||
[build] | ||
target = ["riscv64gc-unknown-linux-musl"] | ||
``` | ||
|
||
Make sure your C compiler is included in `$PATH`, then add it to the `config.toml`: | ||
|
||
```toml | ||
[target.riscv64gc-unknown-linux-musl] | ||
cc = "riscv64-linux-gnu-gcc" | ||
cxx = "riscv64-linux-gnu-g++" | ||
ar = "riscv64-linux-gnu-ar" | ||
linker = "riscv64-linux-gnu-gcc" | ||
``` | ||
|
||
## Building Rust programs | ||
|
||
This target are distributed through `rustup`, and otherwise require no | ||
special configuration. | ||
|
||
## Cross-compilation | ||
|
||
This target can be cross-compiled from any host. | ||
|
||
## Testing | ||
|
||
This target can be tested as normal with `x.py` on a RISC-V host or via QEMU | ||
emulation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters