ucb-bar / riscv-sodor

educational microarchitectures for risc-v isa
Other
677 stars 154 forks source link

Why is it necessary to use RISCV_LINK_OPTS for compilation? #36

Open ghost opened 6 years ago

ghost commented 6 years ago

I changed the branch to cs152-sp18.

I followed the compile template to compile my code. There are some errors about undefined reference function, even though I include the lib.

I found the problem was -nostdlib option in RISCV_LINK_OPTS in Makefile for benchmark. If I omitted it, there was following error.

riscv64-unknown-elf-gcc: error: riscv64-unknown-elf-gcc: No such file or directory.

I want to know the reason of using these options and are there any ways to compile it to get report without using these options?