riscv-software-src / riscv-tests

Other
906 stars 463 forks source link

I have only built 32-bit GNU toolchain, but building riscv-tests requires 64-bit. How to solve this? #595

Closed Heng-Zhou closed 1 week ago

Heng-Zhou commented 1 week ago

I have only built 32-bit RISC-V GNU toolchain. Below are the contents in $RISCV/bin:

... ...
qemu-system-riscv32
riscv32-unknown-elf-addr2line
riscv32-unknown-elf-ar
riscv32-unknown-elf-as
riscv32-unknown-elf-c++
riscv32-unknown-elf-c++filt
riscv32-unknown-elf-cpp
riscv32-unknown-elf-elfedit
riscv32-unknown-elf-g++
riscv32-unknown-elf-gcc
riscv32-unknown-elf-gcc-11.1.0
riscv32-unknown-elf-gcc-ar
riscv32-unknown-elf-gcc-nm
... ...

But when I run make of "Building from repository", I got the following error

make[1]: riscv64-unknown-elf-gcc: Command not found

which means the make command tries to find 64-bit GNU toolchain which I don't have. My work requires to build only 32-bit RISC-V, so how to have the make lend itself to my existing 32-bit GNU toolchain? Thanks.