ucb-bar / riscv-sodor

educational microarchitectures for risc-v isa
Other
687 stars 155 forks source link

error when compile riscv-sodor/riscv-tests/benchmarks with XLEN=32 #48

Closed Lucas-Wye closed 5 years ago

Lucas-Wye commented 5 years ago

Could someone help me?

riscv32-unknown-elf-gcc -I./../env -I./common -I./qsort -I./rsort -I./towers -I./vvadd -I./multiply -I./mm -I./dhrystone -I./spmv -I./mt-vvadd -I./mt-matmul -I./pmp -I./median -DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf -static -nostdlib -nostartfiles -lgcc -T ./common/test.ld -o qsort.riscv ./qsort/qsort_main.c ./common/syscalls.c ./common/crt.S
/home/lustre/riscv_bin/lib/gcc/riscv32-unknown-elf/8.3.0/../../../../riscv32-unknown-elf/bin/ld: /tmp/ccU07r7t.o: in function `.L48':
syscalls.c:(.text+0x158): undefined reference to `__umoddi3'
/home/lustre/riscv_bin/lib/gcc/riscv32-unknown-elf/8.3.0/../../../../riscv32-unknown-elf/bin/ld: /tmp/ccU07r7t.o: in function `.L59':
syscalls.c:(.text+0x188): undefined reference to `__udivdi3'
/home/lustre/riscv_bin/lib/gcc/riscv32-unknown-elf/8.3.0/../../../../riscv32-unknown-elf/bin/ld: syscalls.c:(.text+0x1a0): undefined reference to `__umoddi3'
collect2: error: ld returned 1 exit status
Makefile:54: recipe for target 'qsort.riscv' failed
make: *** [qsort.riscv] Error 1