[libvirt PATCH 272/351] meson: tools: build libnss_libvirt.so shared library

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:58:28 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 tools/Makefile.am     | 18 ------------------
 tools/nss/meson.build | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index b1388280fef..d33e5a20885 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -50,23 +50,6 @@ wireshark/src/libvirt/protocol.h: wireshark/util/genxdrstub.pl \
 endif WITH_WIRESHARK_DISSECTOR
 
 if WITH_NSS
-nss_libnss_libvirt_la_SOURCES =
-nss_libnss_libvirt_la_LDFLAGS = \
-	$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_NSS_SYMBOL_FILE) \
-	$(AM_LDFLAGS) \
-	-module \
-	-export-dynamic \
-	-avoid-version \
-	-shared \
-	-shrext .so.$(NSS_SO_VER)
-
-nss_libnss_libvirt_la_LIBADD = \
-	nss/libnss_libvirt_impl.la
-
-nss_libnss_libvirt_la_DEPENDENCIES = \
-	$(nss_libnss_libvirt_la_LIBADD) \
-	$(LIBVIRT_NSS_SYMBOL_FILE)
-
 nss_libnss_libvirt_guest_la_SOURCES =
 nss_libnss_libvirt_guest_la_LDFLAGS = \
 	$(VERSION_SCRIPT_FLAGS)$(LIBVIRT_GUEST_NSS_SYMBOL_FILE) \
@@ -85,7 +68,6 @@ nss_libnss_libvirt_guest_la_DEPENDENCIES = \
 	$(LIBVIRT_GUEST_NSS_SYMBOL_FILE)
 
 lib_LTLIBRARIES = \
-	nss/libnss_libvirt.la \
 	nss/libnss_libvirt_guest.la
 
 endif WITH_NSS
diff --git a/tools/nss/meson.build b/tools/nss/meson.build
index ef75ffe0010..cfdcc1fe774 100644
--- a/tools/nss/meson.build
+++ b/tools/nss/meson.build
@@ -48,3 +48,23 @@ nss_libvirt_guest_impl = static_library(
     yajl_dep,
   ],
 )
+
+nss_libvirt_syms = '@0@@1@'.format(
+  version_script_flags,
+  meson.current_source_dir() / nss_sym_file,
+)
+
+nss_libvirt_lib = shared_module(
+  'nss_libvirt',
+  name_prefix: nss_prefix,
+  name_suffix: 'so. at 0@'.format(nss_so_ver),
+  link_args: [
+    nss_libvirt_syms,
+    libvirt_export_dynamic,
+  ],
+  link_whole: [
+    nss_libvirt_impl,
+  ],
+  install: true,
+  install_dir: libdir,
+)
-- 
2.26.2




More information about the libvir-list mailing list