I'm not a compiler expert but I think the essential problem is that the RISC-V GNU Compiler Toolchain was generated to use double floats but the invokation of the toolchain in //risc_v/chapters/ch1/Makefile is trying to use soft floats.
Supported ABIs are ilp32 (32-bit soft-float), ilp32d (32-bit hard-float), ilp32f (32-bit with single-precision in registers and double in memory, niche use only), lp64 lp64f lp64d (same but with 64-bit long and pointers).
I can get chapter 1 building and running now. I haven't verified that subsequent chapters still work.
I was getting this error when trying to get chapter 1 working:
I think I found a fix. Posting here in case it helps anyone else out.
Updating this line in
//risc_v/chapters/ch1/Makefile
fixed it for me:I'm not a compiler expert but I think the essential problem is that the RISC-V GNU Compiler Toolchain was generated to use double floats but the invokation of the toolchain in
//risc_v/chapters/ch1/Makefile
is trying to use soft floats.From the RISC-V GNU Compiler Toolchain README:
I can get chapter 1 building and running now. I haven't verified that subsequent chapters still work.
(I also posted this to Stack Overlow: https://stackoverflow.com/a/75652961/1669860)