Skip to content

Commit 6b07a6b

Browse files
Update README.md to account for musl libc
Signed-off-by: Florian Hofhammer <florian.hofhammer@fhofhammer.de>
1 parent f2caeb4 commit 6b07a6b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ run the following command:
6868
./configure --prefix=/opt/riscv
6969
make linux
7070

71-
The build defaults to targetting RV64GC (64-bit), even on a 32-bit build
72-
environment. To build the 32-bit RV32GC toolchain, use:
71+
The build defaults to targeting RV64GC (64-bit) with glibc, even on a 32-bit
72+
build environment. To build the 32-bit RV32GC toolchain, use:
7373

7474
./configure --prefix=/opt/riscv --with-arch=rv32gc --with-abi=ilp32d
7575
make linux
7676

77+
In case you prefer musl libc over glibc, configure just like above and opt for
78+
`make musl` instead of `make linux`.
79+
7780
Supported architectures are rv32i or rv64i plus standard extensions (a)tomics,
7881
(m)ultiplication and division, (f)loat, (d)ouble, or (g)eneral for MAFD.
7982

@@ -88,11 +91,14 @@ To build either cross-compiler with support for both 32-bit and
8891

8992
./configure --prefix=/opt/riscv --enable-multilib
9093

91-
And then either `make` or `make linux` for the Newlib or Linux cross-compiler respectively.
94+
And then either `make`, `make linux` or `make musl` for the Newlib, Linux
95+
glibc-based or Linux musl libc-based cross-compiler, respectively.
9296

93-
The multilib compiler will have the prefix riscv64-unknown-elf- or riscv64-unknown-linux-gnu-,
97+
The multilib compiler will have the prefix riscv64-unknown-elf-,
98+
riscv64-unknown-linux-gnu- or riscv64-unknown-linux-musl-
9499
but will be able to target both 32-bit and 64-bit systems. It will support
95-
the most common `-march`/`-mabi` options, which can be seen by using the `--print-multi-lib` flag on either cross-compiler.
100+
the most common `-march`/`-mabi` options, which can be seen by using the
101+
`--print-multi-lib` flag on either cross-compiler.
96102

97103
### Troubleshooting Build Problems
98104

@@ -241,4 +247,3 @@ Here is the list of configure option for specify source tree:
241247
--with-gdb-src
242248
--with-linux-headers-src
243249
--with-qemu-src
244-

0 commit comments

Comments
 (0)