File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 6666 - [ riscv32imac-unknown-xous-elf] ( platform-support/riscv32imac-unknown-xous-elf.md )
6767 - [ riscv32* -unknown-none-elf] ( platform-support/riscv32-unknown-none-elf.md )
6868 - [ riscv64gc-unknown-linux-gnu] ( platform-support/riscv64gc-unknown-linux-gnu.md )
69+ - [ riscv64gc-unknown-linux-musl] ( platform-support/riscv64gc-unknown-linux-musl.md )
6970 - [ sparc-unknown-none-elf] ( ./platform-support/sparc-unknown-none-elf.md )
7071 - [ * -pc-windows-gnullvm] ( platform-support/pc-windows-gnullvm.md )
7172 - [ \* -nto-qnx-\* ] ( platform-support/nto-qnx.md )
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ target | notes
9898` powerpc64-unknown-linux-gnu ` | PPC64 Linux (kernel 3.2, glibc 2.17)
9999` powerpc64le-unknown-linux-gnu ` | PPC64LE Linux (kernel 3.10, glibc 2.17)
100100[ ` riscv64gc-unknown-linux-gnu ` ] ( platform-support/riscv64gc-unknown-linux-gnu.md ) | RISC-V Linux (kernel 4.20, glibc 2.29)
101+ [ ` riscv64gc-unknown-linux-musl ` ] ( platform-support/riscv64gc-unknown-linux-musl.md ) | RISC-V Linux (kernel 4.20, musl 1.2.3)
101102` s390x-unknown-linux-gnu ` | S390x Linux (kernel 3.2, glibc 2.17)
102103` x86_64-unknown-freebsd ` | 64-bit FreeBSD
103104` x86_64-unknown-illumos ` | illumos
@@ -354,7 +355,6 @@ target | std | host | notes
354355[ ` riscv64gc-unknown-hermit ` ] ( platform-support/hermit.md ) | ✓ | | RISC-V Hermit
355356` riscv64gc-unknown-freebsd ` | | | RISC-V FreeBSD
356357` riscv64gc-unknown-fuchsia ` | | | RISC-V Fuchsia
357- ` riscv64gc-unknown-linux-musl ` | | | RISC-V Linux (kernel 4.20, musl 1.2.3)
358358[ ` riscv64gc-unknown-netbsd ` ] ( platform-support/netbsd.md ) | ✓ | ✓ | RISC-V NetBSD
359359[ ` riscv64gc-unknown-openbsd ` ] ( platform-support/openbsd.md ) | ✓ | ✓ | OpenBSD/riscv64
360360[ ` riscv64-linux-android ` ] ( platform-support/android.md ) | | | RISC-V 64-bit Android
Original file line number Diff line number Diff line change 1+ # riscv64gc-unknown-linux-musl
2+
3+ ** Tier: 2**
4+
5+ Target for RISC-V Linux programs using musl libc.
6+
7+ ## Target maintainers
8+
9+ - [ @Amanieu ] ( https://github.com/Amanieu )
10+ - [ @kraj ] ( https://github.com/kraj )
11+
12+ ## Requirements
13+
14+ Building the target itself requires a RISC-V compiler that is supported by ` cc-rs ` .
15+
16+ ## Building the target
17+
18+ The target can be built by enabling it for a ` rustc ` build.
19+
20+ ``` toml
21+ [build ]
22+ target = [" riscv64gc-unknown-linux-musl" ]
23+ ```
24+
25+ Make sure your C compiler is included in ` $PATH ` , then add it to the ` config.toml ` :
26+
27+ ``` toml
28+ [target .riscv64gc-unknown-linux-musl ]
29+ cc = " riscv64-linux-gnu-gcc"
30+ cxx = " riscv64-linux-gnu-g++"
31+ ar = " riscv64-linux-gnu-ar"
32+ linker = " riscv64-linux-gnu-gcc"
33+ ```
34+
35+ ## Building Rust programs
36+
37+ This target are distributed through ` rustup ` , and otherwise require no
38+ special configuration.
39+
40+ ## Cross-compilation
41+
42+ This target can be cross-compiled from any host.
43+
44+ ## Testing
45+
46+ This target can be tested as normal with ` x.py ` on a RISC-V host or via QEMU
47+ emulation.
You can’t perform that action at this time.
0 commit comments