RISC-V GNU Toolchain 源码获取
$gitclonehttps://github.com/riscv/riscv-gnu-toolchain.git$cdriscv-gnu-toolchain$gitsubmodule update --init –recursive
相关依赖获取
由于使用 Ubuntu 开发 risc-v 较多,这里以 Ubuntu 为例:
$sudoapt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
编译安装
$./configure --prefix=/opt/riscv --enable-multilib$sudomake linux$sudomake install$riscv64-unknown-linux-gnu-gcc -
|