valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0110-meson-drop-misplaced-Wl-undefined-argument.patch

4bff0a
From 0ed1150ccf8837ca85cbb8d5a42fe81b5efeac32 Mon Sep 17 00:00:00 2001
4bff0a
From: Jussi Pakkanen <jpakkane@gmail.com>
4bff0a
Date: Sat, 6 Apr 2019 21:59:06 +0200
4bff0a
Subject: [PATCH] meson: drop misplaced -Wl,--undefined argument
4bff0a
4bff0a
Ld's man page says the following:
4bff0a
4bff0a
  -u symbol
4bff0a
  --undefined=symbol
4bff0a
4bff0a
  Force symbol to be entered in the output file as an undefined symbol. Doing
4bff0a
  this may, for example, trigger linking of additional modules from standard
4bff0a
  libraries. -u may be repeated with different option arguments to enter
4bff0a
  additional undefined symbols. This option is equivalent to the "EXTERN"
4bff0a
  linker script command.
4bff0a
4bff0a
  If this option is being used to force additional modules to be pulled into
4bff0a
  the link, and if it is an error for the symbol to remain undefined, then the
4bff0a
  option --require-defined should be used instead.
4bff0a
4bff0a
This would imply that it always requires an argument, which this does not
4bff0a
pass. Thus it will grab the next argument on the command line as its
4bff0a
argument. Before it took one of the many -lrt args (presumably) and now it
4bff0a
grabs something other random linker argument and things break.
4bff0a
4bff0a
[zj: this line was added in the first version of the meson configuration back
4bff0a
in 5c23128daba7236a6080383b2a5649033cfef85c. AFAICT, this was a mistake. No
4bff0a
such flag appeared in Makefile.am at the time.]
4bff0a
4bff0a
https://github.com/mesonbuild/meson/issues/5113
4bff0a
(cherry picked from commit 700805f6c546f2adb79059614f3747f7b5474325)
4bff0a
---
4bff0a
 meson.build | 3 +--
4bff0a
 1 file changed, 1 insertion(+), 2 deletions(-)
4bff0a
4bff0a
diff --git a/meson.build b/meson.build
4bff0a
index d58926c981..f2d67b7e02 100644
4bff0a
--- a/meson.build
4bff0a
+++ b/meson.build
4bff0a
@@ -1436,8 +1436,7 @@ foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
4bff0a
                         # Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
4bff0a
                         link_args : ['-Wl,-z,nodelete',
4bff0a
                                      '-shared',
4bff0a
-                                     '-Wl,--version-script=' + version_script_arg,
4bff0a
-                                     '-Wl,--undefined'],
4bff0a
+                                     '-Wl,--version-script=' + version_script_arg],
4bff0a
                         link_with : [libsystemd_static,
4bff0a
                                      libbasic],
4bff0a
                         dependencies : [threads,