about summary refs log tree commit diff
path: root/pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2022-04-19 17:51:25 +0900
committerThiago Kenji Okada <thiagokokada@gmail.com>2022-05-10 10:04:43 +0100
commit9cf2c67910794bf17b28cec21fbb726d9b36fefc (patch)
treec24f6327fa28fcdcc978ab1623d3ff562be66de8 /pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch
parentf419dc5763c2b3c5580e396dea065b6d8b58ee27 (diff)
libpulseaudio: fix build on x86_64-darwin
Signed-off-by: Thiago Kenji Okada <thiagokokada@gmail.com>
Diffstat (limited to 'pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch')
-rw-r--r--pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch b/pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch
new file mode 100644
index 0000000000000..6893df8a7e298
--- /dev/null
+++ b/pkgs/servers/pulseaudio/0007-Adapt-undefined-link-args-per-linker.patch
@@ -0,0 +1,44 @@
+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
+