summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Homescu <ahomescu@google.com>2023-09-14 05:36:59 +0000
committerAndrei Homescu <ahomescu@google.com>2023-09-15 07:05:48 +0000
commitb49a63102288d1d74c5c3459f8648068674ecd19 (patch)
treed0453328826c6da5ce1f8864830fcd75840ef41a
parent6efa80d19c3d9b6c2ccfc5d1a48a5ad68c0e5388 (diff)
downloadgeneric-arm64-b49a63102288d1d74c5c3459f8648068674ecd19.tar.gz
project/qemu: Add new capstone header include directory
Capstone headers were recently moved to a subdirectory, which breaks the qemu build. Add the new directory explicitly to the include directory list using -I. Bug: 285203365 Test: build Trusty Change-Id: I3d1a4f527d3364f46e58f50219fd9417cdc97273
-rw-r--r--project/qemu-qemu-inc.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/project/qemu-qemu-inc.mk b/project/qemu-qemu-inc.mk
index 974ab50..3b04155 100644
--- a/project/qemu-qemu-inc.mk
+++ b/project/qemu-qemu-inc.mk
@@ -62,17 +62,20 @@ QEMU_AOSP_DISABLES := \
# Warnings which pollute the build output and which can make us miss
# warnings in non-external code that we should be paying attention to.
-QEMU_SUPPRESSED_WARNINGS := \
+QEMU_EXTRA_CFLAGS := \
-Wno-address-of-packed-member \
-Wno-format-truncation \
-Wno-stringop-truncation \
-Wno-array-bounds \
+# Newer capstone releases have the headers under include/capstone
+QEMU_EXTRA_CFLAGS += -I$(TRUSTY_TOP)/$(QEMU_ROOT)/capstone/include/capstone
+
$(QEMU_MAKEFILE): QEMU_ROOT:=$(QEMU_ROOT)
$(QEMU_MAKEFILE): QEMU_BUILD_BASE:=$(QEMU_BUILD_BASE)
$(QEMU_MAKEFILE): QEMU_TARGET:=$(QEMU_TARGET)
$(QEMU_MAKEFILE): QEMU_AOSP_DISABLES:=$(QEMU_AOSP_DISABLES)
-$(QEMU_MAKEFILE): QEMU_SUPPRESSED_WARNINGS:=$(QEMU_SUPPRESSED_WARNINGS)
+$(QEMU_MAKEFILE): QEMU_EXTRA_CFLAGS:=$(QEMU_EXTRA_CFLAGS)
$(QEMU_MAKEFILE):
mkdir -p $(QEMU_BUILD_BASE)
#--with-git=true sets the "git" program to /bin/true - it essentially disables git
@@ -82,7 +85,7 @@ $(QEMU_MAKEFILE):
# some hosts compiler will complain about stringop truncation.
cd $(QEMU_BUILD_BASE) && $(abspath $(QEMU_ROOT)/configure) \
--target-list=$(QEMU_TARGET) --with-git=true --disable-werror \
- --extra-cflags="$(QEMU_SUPPRESSED_WARNINGS)" \
+ --extra-cflags="$(QEMU_EXTRA_CFLAGS)" \
--disable-gcrypt --disable-vnc-png $(QEMU_AOSP_DISABLES) \
--python=$(BUILDTOOLS_BINDIR)/py3-cmd
@@ -97,4 +100,4 @@ QEMU_ARCH:=
QEMU_ROOT:=
QEMU_TARGET:=
QEMU_AOSP_DISABLES:=
-QEMU_SUPPRESSED_WARNINGS:= \ No newline at end of file
+QEMU_EXTRA_CFLAGS:=