File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -118,17 +118,6 @@ NEWLIB_CC_FOR_TARGET ?= $(NEWLIB_TUPLE)-gcc
118118NEWLIB_CXX_FOR_TARGET ?= $(NEWLIB_TUPLE ) -g++
119119NEWLIB_TARGET_BOARDS ?= arc-sim
120120
121- # QEMU sim setup for running the tests
122- ifeq (@target_alias@,arc)
123- QEMU_CPU = archs
124- else
125- ifeq (@target_alias@,arc32)
126- QEMU_CPU = hs5x
127- else
128- QEMU_CPU = hs6x
129- endif
130- endif
131-
132121ifeq (@default_target@,linux)
133122 TARGET_ALIAS = $(call make_tuple,linux-gnu)
134123 TARGET_TRIPLET = $(call make_tupple,unknown-linux-gnu)
Original file line number Diff line number Diff line change 1010 shift
1111done
1212
13- xlen=" $( readelf -h $1 | grep ' Class' | cut -d: -f 2 | xargs echo | sed ' s/^ELF//' ) "
13+ cpu=$( mcpu-to-cpu-opts --elf-file-path $1 --print-cpu)
14+ xlen=$( mcpu-to-cpu-opts --elf-file-path $1 --print-xlen)
1415
1516case " $xlen " in
1617 64) qemu=" 64"
@@ -19,5 +20,5 @@ case "$xlen" in
1920 mem=" 2G" ;;
2021esac
2122
22- qemu-system-arc$qemu -cpu ${QEMU_CPU} -M arc-sim -m $mem " ${qemu_args[@]} " -nographic \
23+ qemu-system-arc$qemu -cpu $cpu -M arc-sim -m $mem " ${qemu_args[@]} " -nographic \
2324 -no-reboot -monitor none -kernel " $@ "
Original file line number Diff line number Diff line change 1010 shift
1111done
1212
13- xlen=" $( readelf -h $1 | grep ' Class' | cut -d: -f 2 | xargs echo | sed ' s/^ELF//' ) "
13+ cpu=$( mcpu-to-cpu-opts --elf-file-path $1 --print-cpu)
14+ xlen=$( mcpu-to-cpu-opts --elf-file-path $1 --print-xlen)
1415
1516case " $xlen " in
1617 64) qemu=" 64" ;;
1718 * ) qemu=" " ;;
1819esac
1920
20- qemu-arc$qemu -cpu ${QEMU_CPU} -R 3G " ${qemu_args[@]} " -L ${ARC_SYSROOT} " $@ "
21+ qemu-arc$qemu -cpu $cpu -R 3G " ${qemu_args[@]} " -L ${ARC_SYSROOT} " $@ "
You can’t perform that action at this time.
0 commit comments