@@ -68,12 +68,15 @@ run the following command:
68
68
./configure --prefix=/opt/riscv
69
69
make linux
70
70
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:
73
73
74
74
./configure --prefix=/opt/riscv --with-arch=rv32gc --with-abi=ilp32d
75
75
make linux
76
76
77
+ In case you prefer musl libc over glibc, configure just like above and opt for
78
+ ` make musl ` instead of ` make linux ` .
79
+
77
80
Supported architectures are rv32i or rv64i plus standard extensions (a)tomics,
78
81
(m)ultiplication and division, (f)loat, (d)ouble, or (g)eneral for MAFD.
79
82
@@ -88,11 +91,14 @@ To build either cross-compiler with support for both 32-bit and
88
91
89
92
./configure --prefix=/opt/riscv --enable-multilib
90
93
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.
92
96
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-
94
99
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.
96
102
97
103
### Troubleshooting Build Problems
98
104
@@ -241,4 +247,3 @@ Here is the list of configure option for specify source tree:
241
247
--with-gdb-src
242
248
--with-linux-headers-src
243
249
--with-qemu-src
244
-
0 commit comments