This fixes on Darwin:
ld: symbol(s) not found for architecture arm64
"_g_string_append_printf", referenced from:
_log_stats in cache.o
_log_top_insns in cache.o
_append_stats_line in cache.o
ld: symbol(s) not found for architecture arm64
"_g_string_free", referenced from:
_g_autoptr_cleanup_gstring_free in cache.o
"_g_string_insert_len", referenced from:
_log_stats in cache.o
_append_stats_line in cache.o
ld: symbol(s) not found for architecture arm64
"_g_string_new", referenced from:
_log_stats in cache.o
_log_top_insns in cache.o
"_g_strsplit", referenced from:
_qemu_plugin_install in cache.o
...
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
Note LIBS was unused.
---
contrib/plugins/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index b2b9db9f51..e9173972eb 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -26,6 +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).
+LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0)
CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0)
CFLAGS += -fPIC -Wall
CFLAGS += $(if $(CONFIG_DEBUG_TCG), -ggdb -O0)
--
2.41.0