summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRichard Henderson2020-09-13 21:19:25 +0200
committerRichard Henderson2020-10-03 11:22:47 +0200
commit8b18cdbfd6c7add5fb8dae5c81596c381fe6e237 (patch)
treecacce97e4b33e00419be35a74d23e54dd71fc1ae /Makefile
parentMerge remote-tracking branch 'remotes/cohuck/tags/s390x-20201002' into staging (diff)
downloadqemu-8b18cdbfd6c7add5fb8dae5c81596c381fe6e237.tar.gz
qemu-8b18cdbfd6c7add5fb8dae5c81596c381fe6e237.tar.xz
qemu-8b18cdbfd6c7add5fb8dae5c81596c381fe6e237.zip
capstone: Convert Makefile bits to meson bits
There are better ways to do this, e.g. meson cmake subproject, but that requires cmake 3.7 and some of our CI environments only provide cmake 3.5. Nor can we add a meson.build file to capstone/, because the git submodule would then always report "untracked files". Fixing that would require creating our own branch on the qemu git mirror, at which point we could just as easily create a native meson subproject. Instead, build the library via the main meson.build. This improves the current state of affairs in that we will re-link the qemu executables against a changed libcapstone.a, which we wouldn't do before-hand. In addition, the use of the configuration header file instead of command-line -DEFINES means that we will rebuild the capstone objects with changes to meson.build. Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 4 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 54fc1a9d10..f27bd4b2eb 100644
--- a/Makefile
+++ b/Makefile
@@ -156,21 +156,11 @@ dtc/all: .git-submodule-status dtc/libfdt
dtc/%: .git-submodule-status
@mkdir -p $@
-# Overriding CFLAGS causes us to lose defines added in the sub-makefile.
-# Not overriding CFLAGS leads to mis-matches between compilation modes.
-# Therefore we replicate some of the logic in the sub-makefile.
-# Remove all the extra -Warning flags that QEMU uses that Capstone doesn't;
-# no need to annoy QEMU developers with such things.
-CAP_CFLAGS = $(patsubst -W%,,$(CFLAGS) $(QEMU_CFLAGS)) $(CAPSTONE_CFLAGS)
-CAP_CFLAGS += -DCAPSTONE_USE_SYS_DYN_MEM
-CAP_CFLAGS += -DCAPSTONE_HAS_ARM
-CAP_CFLAGS += -DCAPSTONE_HAS_ARM64
-CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
-CAP_CFLAGS += -DCAPSTONE_HAS_X86
-
+# Retain for a while so that incremental build across this patch
+# does not raise an error for missing target "capstone/all", which
+# comes from the saved SUBDIRS value.
.PHONY: capstone/all
-capstone/all: .git-submodule-status
- $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
+capstone/all:
.PHONY: slirp/all
slirp/all: .git-submodule-status