Encounter an error while installing the SPIKE RISC-V simulator

I first installed the RISC-V GNU toolchain (Installed for (Newlib/Linux multilib)) , then installed Spike RISC-V ISA Simulator. Next when I was trying to install the RISC-V Proxy Kernel and Boot Loader, I am facing some issues after giving the make command as shown in the figure below. I am not able to figure it out what I am missing, or any missing/wrong command/step. It will be really appreciable if you can help me to find out the issues for installing the spike simulator in my laptop.

You seem to be invoking the native (x86_64 I presume) GCC instead of the RISC-V cross compiler.

Note at the top of the picture a bunch of messages that say “checking for riscv64-unknown-elf-XXX… no”. At least one of these checks must succeed, preferably the gcc one and perhaps also the g++ one as I think the code is C++. Because all failed, configure then tried to use the native x86_64-linux compiler, and the RISC-V gcc option -mcmodel=medany isn’t valid for the x86_64-linux compiler. You said you installed a riscv elf compiler. It probably has a slightly different name. If it is a compatible compiler to what spike needs, then making some links should work. If not compatible, then you may need to build your own riscv64-unknown-elf-gcc from scratch.