diff options
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | qemu_mode/build_qemu_support.sh | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile index a24092fc..9913c603 100644 --- a/Makefile +++ b/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)\" \ diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh index 9e45686b..bd42c58e 100755 --- a/qemu_mode/build_qemu_support.sh +++ b/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`" -test "$CPU_TARGET" = "i686" && CPU_TARGET="i386" +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 |