aboutsummaryrefslogtreecommitdiff
path: root/contrib/plugins
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-10-12 11:31:32 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-05-18 08:53:52 +0200
commitfc9a809e0d28417fa1e7f7efc19f845bda4c1be9 (patch)
tree8f343c10516cee787f6ad550b955a816b732ea86 /contrib/plugins
parent5328353c05d880fbdba16a968cf9a39c8bd11a14 (diff)
build: move glib detection and workarounds to meson
QEMU adds the path to glib.h to all compilation commands. This is simpler due to the pervasive use of static_library, and was grandfathered in from the previous Make-based build system. Until Meson 0.63 the only way to do this was to detect glib in configure and use add_project_arguments, but now it is possible to use add_project_dependencies instead. gmodule is detected in a separate variable, with export enabled for modules and disabled for plugin. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'contrib/plugins')
-rw-r--r--contrib/plugins/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index 23e0396687..8a316cd76f 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -3,7 +3,7 @@
# This Makefile example is fairly independent from the main makefile
# so users can take and adapt it for their build. We only really
# include config-host.mak so we don't have to repeat probing for
-# cflags that the main configure has already done for us.
+# programs that the main configure has already done for us.
#
BUILD_DIR := $(CURDIR)/../..
@@ -26,7 +26,7 @@ SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
# The main QEMU uses Glib extensively so it's perfectly fine to use it
# in plugins (which many example do).
-CFLAGS = $(GLIB_CFLAGS)
+CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0)
CFLAGS += -fPIC -Wall $(filter -W%, $(QEMU_CFLAGS))
CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
CFLAGS += $(if $(CONFIG_DEBUG_TCG), -ggdb -O0)