Add platform support document for riscv64gc-unknown-linux-musl
This commit is contained in:
parent
a937a3b5a1
commit
9963a6c400
@ -66,6 +66,7 @@
|
|||||||
- [riscv32imac-unknown-xous-elf](platform-support/riscv32imac-unknown-xous-elf.md)
|
- [riscv32imac-unknown-xous-elf](platform-support/riscv32imac-unknown-xous-elf.md)
|
||||||
- [riscv32*-unknown-none-elf](platform-support/riscv32-unknown-none-elf.md)
|
- [riscv32*-unknown-none-elf](platform-support/riscv32-unknown-none-elf.md)
|
||||||
- [riscv64gc-unknown-linux-gnu](platform-support/riscv64gc-unknown-linux-gnu.md)
|
- [riscv64gc-unknown-linux-gnu](platform-support/riscv64gc-unknown-linux-gnu.md)
|
||||||
|
- [riscv64gc-unknown-linux-musl](platform-support/riscv64gc-unknown-linux-musl.md)
|
||||||
- [sparc-unknown-none-elf](./platform-support/sparc-unknown-none-elf.md)
|
- [sparc-unknown-none-elf](./platform-support/sparc-unknown-none-elf.md)
|
||||||
- [*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md)
|
- [*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md)
|
||||||
- [\*-nto-qnx-\*](platform-support/nto-qnx.md)
|
- [\*-nto-qnx-\*](platform-support/nto-qnx.md)
|
||||||
|
@ -98,6 +98,7 @@ target | notes
|
|||||||
`powerpc64-unknown-linux-gnu` | PPC64 Linux (kernel 3.2, glibc 2.17)
|
`powerpc64-unknown-linux-gnu` | PPC64 Linux (kernel 3.2, glibc 2.17)
|
||||||
`powerpc64le-unknown-linux-gnu` | PPC64LE Linux (kernel 3.10, glibc 2.17)
|
`powerpc64le-unknown-linux-gnu` | PPC64LE Linux (kernel 3.10, glibc 2.17)
|
||||||
[`riscv64gc-unknown-linux-gnu`](platform-support/riscv64gc-unknown-linux-gnu.md) | RISC-V Linux (kernel 4.20, glibc 2.29)
|
[`riscv64gc-unknown-linux-gnu`](platform-support/riscv64gc-unknown-linux-gnu.md) | RISC-V Linux (kernel 4.20, glibc 2.29)
|
||||||
|
[`riscv64gc-unknown-linux-musl`](platform-support/riscv64gc-unknown-linux-musl.md) | RISC-V Linux (kernel 4.20, musl 1.2.3)
|
||||||
`s390x-unknown-linux-gnu` | S390x Linux (kernel 3.2, glibc 2.17)
|
`s390x-unknown-linux-gnu` | S390x Linux (kernel 3.2, glibc 2.17)
|
||||||
`x86_64-unknown-freebsd` | 64-bit FreeBSD
|
`x86_64-unknown-freebsd` | 64-bit FreeBSD
|
||||||
`x86_64-unknown-illumos` | illumos
|
`x86_64-unknown-illumos` | illumos
|
||||||
@ -354,7 +355,6 @@ target | std | host | notes
|
|||||||
[`riscv64gc-unknown-hermit`](platform-support/hermit.md) | ✓ | | RISC-V Hermit
|
[`riscv64gc-unknown-hermit`](platform-support/hermit.md) | ✓ | | RISC-V Hermit
|
||||||
`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD
|
`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD
|
||||||
`riscv64gc-unknown-fuchsia` | | | RISC-V Fuchsia
|
`riscv64gc-unknown-fuchsia` | | | RISC-V Fuchsia
|
||||||
`riscv64gc-unknown-linux-musl` | | | RISC-V Linux (kernel 4.20, musl 1.2.3)
|
|
||||||
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
|
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
|
||||||
[`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64
|
[`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64
|
||||||
[`riscv64-linux-android`](platform-support/android.md) | | | RISC-V 64-bit Android
|
[`riscv64-linux-android`](platform-support/android.md) | | | RISC-V 64-bit Android
|
||||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user