rv32ima-ilp32 is not one of the default multilib combinations enabled in
riscv-gnu-toolchain. You will need to modify and regenerate
configure.ac
yourself:
https://github.com/riscv/riscv-gnu-toolchain/blob/256a4108922f76403a63d6567501c479971d5575/configure.ac#L106
The libgloss configure test is quite definitive, as it checks that the
__riscv built-in macro is defined. If running configure manually, you
must pass the correct --host triplet (as the error message helpfully
suggests), or autoconf instead detects the native gcc.
> Is there a clean way to compile for 32 bit in a way that incorporates the
> htif linker script?
>
It is usually simpler to dispense with multilib and build an ELF
toolchain for the exact march/mabi combination desired by using the
--with-arch and --with-abi configure options. Then libgloss can be
built and used as usual (after providing --host), since gcc will just
use the default target in the absence of -march or -mabi.
> --
> You received this message because you are subscribed to the Google Groups "Chipyard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
chipyard+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/chipyard/64981411-f70d-4d73-ad6e-bdecd04cf72en%40googlegroups.com.
--
Albert Ou