forked from mirrors/nixpkgs
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
|
From 6f132be835d5acb5db4301ea1818601504e47fae Mon Sep 17 00:00:00 2001
|
||
|
From: Andrew Childs <andrew.childs@bibo.com.ph>
|
||
|
Date: Tue, 19 Apr 2022 17:41:34 +0900
|
||
|
Subject: [PATCH 7/8] Adapt undefined link args per linker
|
||
|
|
||
|
TODO: Why is this required? Isn't it default?
|
||
|
---
|
||
|
src/modules/meson.build | 13 ++++++++++++-
|
||
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/modules/meson.build b/src/modules/meson.build
|
||
|
index be72c3b9b..0163b583f 100644
|
||
|
--- a/src/modules/meson.build
|
||
|
+++ b/src/modules/meson.build
|
||
|
@@ -293,6 +293,17 @@ all_modules += [
|
||
|
# FIXME: meson doesn't support multiple RPATH arguments currently
|
||
|
rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
|
||
|
|
||
|
+if meson.get_compiler('c').get_linker_id().startswith('ld.')
|
||
|
+ no_undefined_link_args = [ '-Wl,--no-undefined' ]
|
||
|
+elif meson.get_compiler('c').get_linker_id() == 'ld64'
|
||
|
+ # TODO: is this required? is this not default?
|
||
|
+ no_undefined_link_args = [ '-Wl,-undefined,error' ]
|
||
|
+else
|
||
|
+ # TODO: what platforms is this? what flag do they use?
|
||
|
+ no_undefined_link_args = []
|
||
|
+endif
|
||
|
+
|
||
|
+
|
||
|
foreach m : all_modules
|
||
|
name = m[0]
|
||
|
sources = m[1]
|
||
|
@@ -310,7 +321,7 @@ foreach m : all_modules
|
||
|
install_rpath : rpath_dirs,
|
||
|
install_dir : modlibexecdir,
|
||
|
dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep, platform_dep, platform_socket_dep] + extra_deps,
|
||
|
- link_args : [nodelete_link_args, '-Wl,--no-undefined' ],
|
||
|
+ link_args : [nodelete_link_args, no_undefined_link_args ],
|
||
|
link_with : extra_libs,
|
||
|
name_prefix : '',
|
||
|
implicit_include_directories : false)
|
||
|
--
|
||
|
2.35.1
|
||
|
|