Commit Graph

10 Commits

Author SHA1 Message Date
Andrea Bolognani
b05dfcdfcb meson: Don't attempt to use version scripts on macOS
macOS libraries don't support symbol versioning, so the only
result that we achieve by passing additional flags to the linker
is a bunch of messages like

  ld: warning: ignoring file .../libvirt/build/src/libvirt.syms,
  building for macOS-x86_64 but attempting to link with file built
  for unknown-unsupported file format ( 0x23 0x20 0x57 0x41 ... )

being produced during the build.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-06 11:12:48 +02:00
Andrea Bolognani
fac80100c0 meson: Refactor handling of link_args and link_depends
This ensures variable names and the overall structure of the
code setting and using them is consistent. It will also make
upcoming changes less disruptive.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-06 11:12:44 +02:00
Andrea Bolognani
00c4dd794a nss: Use shared_library() for nss_libvirt_lib
shared_module() is intended for shared objects that are
loaded at runtime using dlopen() whereas NSS plugins need to
be full-fledged shared libraries with, among other things, a
proper SONAME.

Meson seems to have become more strict about this recently,
because libnss_libvirt.so.2 gets a SONAME when I build it with
Meson 0.59.4 on Fedora 34 but doesn't when I use Meson 0.60.2
on Debian testing instead.

Either way, shared_library() was always the right function
to use for NSS plugins.

Fixes: 36780c9319
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-12-13 14:17:56 +01:00
Jiri Denemark
36b47ffed9 meson: Fix build with -Dtest_coverage=true
As can be seen in commit 8a62a1592a (from
autoconf era), the coverage flags have to be used also when linking
objects. However, this was not reflected when we switched to meson.

Without this patch linking fails with undefined references to various
__gcov_* symbols.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-01-19 16:25:50 +01:00
Pavel Hrdina
7dc94bafe3 meson: tests: add nss specific tests
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:06 +02:00
Pavel Hrdina
f1cc0164ba meson: tools: build libnss_libvirt_guest.so shared_library
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:05 +02:00
Pavel Hrdina
36780c9319 meson: tools: build libnss_libvirt.so shared library
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:05 +02:00
Pavel Hrdina
b980fa81f0 meson: tools: build libnss_libvirt_guest_impl.a static library
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:05 +02:00
Pavel Hrdina
6d6e271721 meson: tools: build libnss_libvirt_impl.a static library
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:05 +02:00
Pavel Hrdina
933332ecd4 meson: tools: introduce nss directory
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:27:05 +02:00