From: Juergen Gross Date: Wed, 7 Mar 2018 11:03:18 +0000 (+0100) Subject: tools/xenstore: add libdl dependency to libxenstore X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~447 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c9bd8a73656d7435b1055ee8825823aee995993e;p=xen.git tools/xenstore: add libdl dependency to libxenstore Commit 448c03b3cbe14873ee63 ("tools/xenstore: try to get minimum thread stack size for watch thread") added a dependency to libdl to libxenstore. Add the needed flags to LDLIBS_libxenstore and the pkg-config file of libxenstore. Fixes: 448c03b3cbe14873ee63 Signed-off-by: Juergen Gross Acked-by: Wei Liu --- diff --git a/tools/Rules.mk b/tools/Rules.mk index 61515d3063..296b722372 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -149,6 +149,9 @@ CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude) SHDEPS_libxenstore = $(SHLIB_libxentoolcore) LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension) SHLIB_libxenstore = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE) +ifeq ($(CONFIG_Linux),y) +LDLIBS_libxenstore += -ldl +endif CFLAGS_libxenstat = -I$(XEN_LIBXENSTAT) SHDEPS_libxenstat = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 4473cf60b5..69e55e73e5 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -105,6 +105,8 @@ xs.opic: CFLAGS += -DUSE_PTHREAD ifeq ($(CONFIG_Linux),y) xs.opic: CFLAGS += -DUSE_DLSYM libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl +else +PKG_CONFIG_REMOVE += -ldl endif libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in index 6fd72a1f17..2f64a6b824 100644 --- a/tools/xenstore/xenstore.pc.in +++ b/tools/xenstore/xenstore.pc.in @@ -7,4 +7,5 @@ Description: The Xenstore library for Xen hypervisor Version: @@version@@ Cflags: -I${includedir} @@cflagslocal@@ Libs: @@libsflag@@${libdir} -lxenstore +Libs.private: -ldl Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore