aboutsummaryrefslogtreecommitdiff
path: root/scripts/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wrapper')
-rwxr-xr-xscripts/wrapper/qemu/riscv64-unknown-linux-gnu-run2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run b/scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run
index f0943f4..93dfccf 100755
--- a/scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run
+++ b/scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run
@@ -10,6 +10,6 @@ do
shift
done
-xlen="$(readelf -h $1 | grep 'Class' | cut -d: -f 2 | xargs echo | sed 's/^ELF//')"
+xlen="$(march-to-cpu-opt --get-elf-class $1)"
QEMU_CPU="$(march-to-cpu-opt --get-riscv-tag $1)" qemu-riscv$xlen -r 5.10 "${qemu_args[@]}" -L ${RISC_V_SYSROOT} "$@"