blob: 87c9e6b588163ea36414c215a4240cfe9fbef1f1 [file] [log] [blame]
From 9a8df1f080296691a0e78b1933cbf024a6a1114a Mon Sep 17 00:00:00 2001
From: Vaibhav Rustagi <vaibhavrustagi@google.com>
Date: Wed, 10 Jun 2020 12:25:52 -0700
Subject: [PATCH] meson: drop misplaced -Wl,--undefined argument
Ld's man page says the following:
-u symbol
--undefined=symbol
Force symbol to be entered in the output file as an undefined symbol. Doing
this may, for example, trigger linking of additional modules from standard
libraries. -u may be repeated with different option arguments to enter
additional undefined symbols. This option is equivalent to the "EXTERN"
linker script command.
If this option is being used to force additional modules to be pulled into
the link, and if it is an error for the symbol to remain undefined, then the
option --require-defined should be used instead.
This would imply that it always requires an argument, which this does not
pass. Thus it will grab the next argument on the command line as its
argument. Before it took one of the many -lrt args (presumably) and now it
grabs something other random linker argument and things break.
[zj: this line was added in the first version of the meson configuration back
in 5c23128. AFAICT, this was a mistake. No
such flag appeared in Makefile.am at the time.]
---
meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 04331dd41a..9b13f5d5bf 100644
--- a/meson.build
+++ b/meson.build
@@ -1425,8 +1425,7 @@ foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
link_args : ['-Wl,-z,nodelete',
'-shared',
- '-Wl,--version-script=' + version_script_arg,
- '-Wl,--undefined'],
+ '-Wl,--version-script=' + version_script_arg],
link_with : [libsystemd_static,
libbasic],
dependencies : [threads,
--
2.27.0.278.ge193c7cf3a9-goog