Troubles building cross-compiler; target 64-bit RISC-V
Tue Aug 6 10:23:00 GMT 2019

Aug 5, 2019, 11:23 PM by

> As Segher mentioned, the configure arguments for binutils need to be
> the same as for gcc, the --target, --prefix, --program-prefix at least
> need to be the same, …
Binutils configured with:
../binutils-2.32/configure --target=riscv64 --prefix=/home/borys/devel/riscv64 --with-chroot --disable-nls --disable-werror CC=ntvgcc CXX=ntvg++

GCC configured with:
../gcc-9.1.0/configure --target=riscv64-elf --prefix=/home/borys/devel/riscv64 --disable-nls --enable-languages=c --without-headers CC=ntvgcc CXX=ntvg++

Trying to configure binutils with --target=riscv64-elf and it works, too.
Trying to configure gcc with --target and:
*** Configuration riscv64-unknown-none not supported

It worked. I had to specify program-prefix option. I am just curious, what is the difference between riscv64 and riscv64-elf targets. Binutils accepts both. I am able to produce ELF executable using both.

More information about the Gcc-help mailing list