tools/xenstore: Don't link libxenstore against systemd
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Mar 2018 11:13:19 +0000 (11:13 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Mar 2018 11:17:04 +0000 (11:17 +0000)
It is only xenstored which uses libsystemd.  Avoid having libxenstore pull
libsystemd into the address space of all of its users.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xenstore/Makefile

index 0831be0b6fb00e737d5b874eb1b2bf0e0b1c07ef..4473cf60b531f381ca557613917329b887c6cb6d 100644 (file)
@@ -15,9 +15,6 @@ CFLAGS += $(CFLAGS_libxentoolcore)
 CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\""
 CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
 
-CFLAGS-$(CONFIG_SYSTEMD)  += $(SYSTEMD_CFLAGS)
-LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS)
-
 CFLAGS  += $(CFLAGS-y)
 LDFLAGS += $(LDFLAGS-y)
 
@@ -74,6 +71,11 @@ xenstored_probes.o: xenstored_solaris.o
 CFLAGS += -DHAVE_DTRACE=1
 endif
 
+ifeq ($(CONFIG_SYSTEMD),y)
+$(XENSTORED_OBJS): CFLAGS += $(SYSTEMD_CFLAGS)
+xenstored: LDFLAGS += $(SYSTEMD_LIBS)
+endif
+
 $(XENSTORED_OBJS): CFLAGS += $(CFLAGS_libxengnttab)
 
 xenstored: $(XENSTORED_OBJS)