cpu="s390"
fi
elif check_define __riscv ; then
- cpu="riscv"
+ if check_define _LP64 ; then
+ cpu="riscv64"
+ else
+ cpu="riscv32"
+ fi
elif check_define __arm__ ; then
cpu="arm"
elif check_define __aarch64__ ; then
mips64)
linux_arch=mips
;;
+ riscv32|riscv64)
+ linux_arch=riscv
+ ;;
*)
# For most CPUs the kernel architecture name and QEMU CPU name match.
linux_arch="$cpu"