aboutsummaryrefslogtreecommitdiff
path: root/scripts/wrapper
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2023-04-24 16:13:24 +0800
committerKito Cheng <kito.cheng@sifive.com>2023-04-24 16:13:24 +0800
commit5da0026b1bff81d6de1dcf21636a970094b61c20 (patch)
treefab0fd473088375c4da8e6ee5a141ffd59eb7495 /scripts/wrapper
parent22f2d289b82e2e246281464bbd74e71376d99a81 (diff)
downloadriscv-gnu-toolchain-5da0026b1bff81d6de1dcf21636a970094b61c20.zip
riscv-gnu-toolchain-5da0026b1bff81d6de1dcf21636a970094b61c20.tar.gz
riscv-gnu-toolchain-5da0026b1bff81d6de1dcf21636a970094b61c20.tar.bz2
Add --get-elf-class for march-to-cpu-opt
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} "$@"