Skip to contentSkip to conversation

tools/xenstore: add libdl dependency to libxenstore

PATCH In review Juergen Gross 2 participants 2 messages Mar 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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
---
 tools/Rules.mk                | 3 +++
 tools/xenstore/Makefile       | 2 ++
 tools/xenstore/xenstore.pc.in | 1 +
 3 files changed, 6 insertions(+)
tools/Rules.mk +3 -0
index 61515d3063..296b722372 100644
@@ -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)
tools/xenstore/Makefile +2 -0
index 0831be0b6f..16260aabc5 100644
@@ -103,6 +103,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
tools/xenstore/xenstore.pc.in +1 -0
index 6fd72a1f17..2f64a6b824 100644
@@ -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
Signature · 7 lines
2.13.6


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v2 1/1
#1 lore raw
Quoted 9 lines · Juergen Gross

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

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel