musl-riscv-toolchain-7.1.0-2
Building
To build gcc 7.1 musl libc toolchains for riscv32, riscv64, i386 and x86_64:
for i in rv32 rv64 x86_64 i386 ; do sh bootstrap.sh $i ; rm -fr build stamps ; done
Archives
The script downloads source dependencies from the upstream sites however it is possible to short circuit this process by creating an archives
subdirectory and pre-populating it with the tarballs attached to this release before running the bootstrap.sh
script.
This table shows the SHA-256 digests of the source archives:
6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 binutils-2.28.tar.bz2
325adf3710ce2229b7eeb9e84d3b539556d093ae860027185e7af8a8b00a750e cloog-0.18.4.tar.gz
8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 gcc-7.1.0.tar.bz2
498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8 gmp-6.1.0.tar.bz2
412538bb65c799ac98e17e8cfcdacbb257a57362acfaaff254b0fcae970126d2 isl-0.16.1.tar.bz2
617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 mpc-1.0.3.tar.gz
ca498c1c7a74dd37a576f353312d1e68d490978de4395fa28f1cbd46a364e658 mpfr-3.1.5.tar.bz2
Layout
After building, the toolchain will be installed as follows:
/opt/riscv/musl-riscv-toolchain-7.1.0-2/
bin/
i386-linux-musl-{as,ld,gcc,g++,strip,objdump}
riscv32-linux-musl-{as,ld,gcc,g++,strip,objdump}
riscv64-linux-musl-{as,ld,gcc,g++,strip,objdump}
x86_64-linux-musl-{as,ld,gcc,g++,strip,objdump}
i386-linux-musl/
lib/
include/
riscv32-linux-musl/
lib/
include/
riscv64-linux-musl/
lib/
include/
x86_64-linux-musl/
lib/
include/
Notes
- when linking dynamic executables use the
-dynamic-linker
linker option to set the program interpreter e.g.-Wl,-dynamic-linker,/lib/ld-musl-riscv64.so.1