From 5cbe0b1085c03ef0009366ee056c4750088f68d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 25 Jan 2018 09:35:59 +0000 Subject: [PATCH] build: link libvirt_lxc against libvirt.so MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than static linking in various of the helper libraries to libvirt_lxc, just link against the main libvirt.so. This is more memory and time efficient because it will already be cached in memory and sharable between processes. CAPNG flags need adding because the LXC code directly calls various libcapng APIs and no longer inherits the CAPNG flags via the statically linked .a libs. Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 10 +++++----- src/libvirt_private.syms | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 5d84396644..7f9961fe55 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3113,14 +3113,12 @@ libvirt_lxc_SOURCES = \ libvirt_lxc_LDFLAGS = \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ + $(CAPNG_LIBS) \ + $(LIBXML_LIBS) \ $(NULL) libvirt_lxc_LDADD = \ $(FUSE_LIBS) \ - libvirt-net-rpc-server.la \ - libvirt-net-rpc.la \ - libvirt_security_manager.la \ - libvirt_conf.la \ - libvirt_util.la \ + libvirt.la \ ../gnulib/lib/libgnu.la if WITH_DTRACE_PROBES libvirt_lxc_LDADD += libvirt_probes.lo @@ -3130,6 +3128,8 @@ libvirt_lxc_CFLAGS = \ -I$(srcdir)/conf \ $(AM_CFLAGS) \ $(PIE_CFLAGS) \ + $(CAPNG_CFLAGS) \ + $(LIBXML_CFLAGS) \ $(LIBNL_CFLAGS) \ $(FUSE_CFLAGS) \ $(DBUS_CFLAGS) \ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 3ec510bd32..bbe97b161f 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -347,6 +347,7 @@ virDomainDiskSetSource; virDomainDiskSetType; virDomainFSDefFree; virDomainFSDefNew; +virDomainFSDriverTypeToString; virDomainFSIndexByName; virDomainFSInsert; virDomainFSRemove; @@ -470,6 +471,7 @@ virDomainObjGetOneDefState; virDomainObjGetPersistentDef; virDomainObjGetState; virDomainObjNew; +virDomainObjParseFile; virDomainObjParseNode; virDomainObjRemoveTransientDef; virDomainObjSetDefTransient;