]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Drop support for -Wl,-M
authorAndrea Bolognani <abologna@redhat.com>
Thu, 5 May 2022 13:48:53 +0000 (15:48 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 6 May 2022 09:12:50 +0000 (11:12 +0200)
This was originally introduced in c2fb8bfee309, reportedly to
support symbol versioning on Solaris; more recently, 30b301c6eaa9
ported it to meson.

Up until the previous commit this has resulted in passing

  -M .../libvirt/build/src/libvirt.syms

to the linker on macOS, but the implementation of the -M option
on that platform's linker is literally

  else if ( strcmp(arg, "-M") == 0 ) {
      // FIX FIX
  }

so in practice we've been providing an additional input file,
which the linker understandably ignores after printing a warning
since it's not in any format that it recognizes.

Considering that LLVM's linker, which is now used by default on
FreeBSD, supports the same --version-script option as the GNU
linker, that we have introduced special handling for macOS, and
that we don't target Solaris, we can simply drop the branch at
this point.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
meson.build

index 5787397dcdb43b2dc919190aa350a59862b7c27b..a1c802b00d5f1d77c3299a1394b49d73fe224a3b 100644 (file)
@@ -517,8 +517,6 @@ else
   test_file = '@0@/src/libvirt_qemu.syms'.format(meson.source_root())
   if cc.has_link_argument('-Wl,--version-script=@0@'.format(test_file))
     version_script_flags = '-Wl,--version-script='
-  elif cc.has_link_argument('-Wl,-M,')
-    version_script_flags = '-Wl,-M,'
   else
     error('No supported version script link argument found.')
   endif