riscv-tests icon indicating copy to clipboard operation
riscv-tests copied to clipboard

how to complie the the test 'mm' or 'mt-matmul' with rv32im?

Open Tianhang-Cheng opened this issue 3 years ago • 0 comments

I would like to complie the test 'mm' or 'mt-matmul' with rv32im , can someone tell me how to modify the makefile. I can only compile them in riscv64-unknown-elf. If I use riscv32-unknown-elf in makefile, there will be 'undefined reference to `__sync_fetch_and_add_4' error.

really thanks!


/opt/riscv32/lib/gcc/riscv32-unknown-elf/9.2.0/../../../../riscv32-unknown-elf/bin/ld: /tmp/ccysEb0N.o: in function .L0 ': mm_main.c:(.text+0x22): undefined reference to __sync_fetch_and_add_4' collect2: error: ld returned 1 exit status make: *** [Makefile:55:mm.riscv] error 1

Tianhang-Cheng avatar Jun 20 '21 04:06 Tianhang-Cheng