detect arm in build_qemu_support.sh
MODIFY
Makefile
Makefile
@@ -64,11 +64,6 @@ ifneq "$(shell uname -m)" "x86_64"
endif
endif
-#support for qemu on arm
-ifneq "$(findstring arm, $(shell uname -m))" ""
- export CPU_TARGET=arm
-endif
-
CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT)
override CFLAGS += -Wall -g -Wno-pointer-sign -I include/ \
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \

MODIFY
qemu_mode/build_qemu_support.sh
qemu_mode/build_qemu_support.sh
@@ -143,8 +143,16 @@ echo "[*] Configuring QEMU for $CPU_TARGET..."
ORIG_CPU_TARGET="$CPU_TARGET"
-test "$CPU_TARGET" = "" && CPU_TARGET="`uname -m`"
+if [ "$ORIG_CPU_TARGET" = "" ]; then
+ CPU_TARGET="`uname -m`"
test "$CPU_TARGET" = "i686" && CPU_TARGET="i386"
+ test "$CPU_TARGET" = "arm64v8" && CPU_TARGET="aarch64"
+ case "$CPU_TARGET" in
+ *arm*)
+ CPU_TARGET="arm"
+ ;;
+ esac
+fi
cd qemu-$VERSION || exit 1

detect arm in build_qemu_support.sh