tools/xenstore: add libdl dependency to libxenstore
authorJuergen Gross <jgross@suse.com>
Wed, 7 Mar 2018 11:03:18 +0000 (12:03 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 7 Mar 2018 16:33:40 +0000 (16:33 +0000)
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 <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/Rules.mk
tools/xenstore/Makefile
tools/xenstore/xenstore.pc.in

index 61515d30635e7e570df3122a936240b932af4987..296b722372f37ae7c00940ec244570f5f31fb83a 100644 (file)
@@ -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)
index 4473cf60b531f381ca557613917329b887c6cb6d..69e55e73e5ecea96c83b9f3624f14e27c8ec7474 100644 (file)
@@ -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
index 6fd72a1f1785b0b7b021498e633d285726dffb30..2f64a6b824f875613e0234106c8b8a36c4beb7c0 100644 (file)
@@ -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