Commit f996ad06 authored by Arun Raghavan's avatar Arun Raghavan

build-sys: meson: Add -Wl,no-delete to relevant libraries

This mirrors the autotools option for all server-side dynamic libraries.
parent d8927b0e
...@@ -286,12 +286,17 @@ cdata.set('GETGROUPS_T', 'gid_t') ...@@ -286,12 +286,17 @@ cdata.set('GETGROUPS_T', 'gid_t')
configinc = include_directories('.') configinc = include_directories('.')
topinc = include_directories('src') topinc = include_directories('src')
# CFLAGS # CFLAGS/LDFLAGS
pa_c_args = ['-DHAVE_CONFIG_H', '-D_GNU_SOURCE'] pa_c_args = ['-DHAVE_CONFIG_H', '-D_GNU_SOURCE']
server_c_args = ['-D__INCLUDED_FROM_PULSE_AUDIO'] server_c_args = ['-D__INCLUDED_FROM_PULSE_AUDIO']
cdata.set('MESON_BUILD', 1) cdata.set('MESON_BUILD', 1)
# On ELF systems we don't want the libraries to be unloaded since we don't clean them up properly,
# so we request the nodelete flag to be enabled.
# On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
nodelete_link_args = ['-Wl,-z,nodelete']
# Code coverage # Code coverage
if get_option('gcov') if get_option('gcov')
......
...@@ -181,6 +181,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor, ...@@ -181,6 +181,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_headers, libpulsecommon_headers,
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true, install : true,
install_dir : privlibdir, install_dir : privlibdir,
dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep], dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep],
......
...@@ -30,6 +30,7 @@ libalsa_util = shared_library('alsa-util', ...@@ -30,6 +30,7 @@ libalsa_util = shared_library('alsa-util',
libalsa_util_sources, libalsa_util_sources,
libalsa_util_headers, libalsa_util_headers,
c_args : [pa_c_args, server_c_args], c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, alsa_dep, dbus_dep, libm_dep, udev_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, alsa_dep, dbus_dep, libm_dep, udev_dep],
install : true, install : true,
......
...@@ -24,6 +24,7 @@ libbluez5_util = shared_library('bluez5-util', ...@@ -24,6 +24,7 @@ libbluez5_util = shared_library('bluez5-util',
libbluez5_util_sources, libbluez5_util_sources,
libbluez5_util_headers, libbluez5_util_headers,
c_args : [pa_c_args, server_c_args], c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep],
install : true, install : true,
......
...@@ -15,7 +15,7 @@ libwebrtc_util = shared_library('webrtc-util', ...@@ -15,7 +15,7 @@ libwebrtc_util = shared_library('webrtc-util',
cpp_args : [pa_c_args, server_c_args], cpp_args : [pa_c_args, server_c_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, webrtc_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, webrtc_dep],
link_args : [ '-Wl,--unresolved-symbols=ignore-in-object-files' ], link_args : [nodelete_link_args, '-Wl,--unresolved-symbols=ignore-in-object-files'],
install : true, install : true,
install_dir : modlibexecdir, install_dir : modlibexecdir,
) )
...@@ -275,7 +275,7 @@ foreach m : all_modules ...@@ -275,7 +275,7 @@ foreach m : all_modules
install : true, install : true,
install_dir : modlibexecdir, install_dir : modlibexecdir,
dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep] + extra_deps, dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep] + extra_deps,
link_args : [ '-Wl,--no-undefined' ], link_args : [nodelete_link_args, '-Wl,--no-undefined' ],
link_with : extra_libs, link_with : extra_libs,
name_prefix : '', name_prefix : '',
implicit_include_directories : false) implicit_include_directories : false)
......
...@@ -18,6 +18,7 @@ libraop = shared_library('raop', ...@@ -18,6 +18,7 @@ libraop = shared_library('raop',
libraop_sources, libraop_sources,
libraop_headers, libraop_headers,
c_args : [pa_c_args, server_c_args], c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, librtp_dep, openssl_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, librtp_dep, openssl_dep],
install : true, install : true,
......
...@@ -18,6 +18,7 @@ librtp = shared_library('rtp', ...@@ -18,6 +18,7 @@ librtp = shared_library('rtp',
librtp_sources, librtp_sources,
librtp_headers, librtp_headers,
c_args : [pa_c_args, server_c_args], c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true, install : true,
......
...@@ -76,6 +76,7 @@ libpulse = shared_library('pulse', ...@@ -76,6 +76,7 @@ libpulse = shared_library('pulse',
version : libpulse_version, version : libpulse_version,
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true, install : true,
dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep], dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep],
implicit_include_directories : false) implicit_include_directories : false)
...@@ -92,6 +93,7 @@ libpulse_simple = shared_library('pulse-simple', ...@@ -92,6 +93,7 @@ libpulse_simple = shared_library('pulse-simple',
'simple.h', 'simple.h',
version : libpulse_simple_version, version : libpulse_simple_version,
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep], dependencies : [libpulse_dep, libpulsecommon_dep],
install : true, install : true,
...@@ -105,6 +107,7 @@ if glib_dep.found() ...@@ -105,6 +107,7 @@ if glib_dep.found()
'glib-mainloop.h', 'glib-mainloop.h',
version : libpulse_mainloop_glib_version, version : libpulse_mainloop_glib_version,
c_args : [pa_c_args], c_args : [pa_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep], dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep],
install : true, install : true,
......
...@@ -189,6 +189,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor, ...@@ -189,6 +189,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
orc_sources, orc_headers, orc_sources, orc_headers,
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
c_args : [pa_c_args, server_c_args], c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
install : true, install : true,
install_dir : privlibdir, install_dir : privlibdir,
link_with : libpulsecore_simd_lib, link_with : libpulsecore_simd_lib,
...@@ -204,6 +205,7 @@ libavahi_wrap = shared_library('avahi-wrap', ...@@ -204,6 +205,7 @@ libavahi_wrap = shared_library('avahi-wrap',
'avahi-wrap.c', 'avahi-wrap.c',
'avahi-wrap.h', 'avahi-wrap.h',
c_args : [pa_c_args, server_c_args, database_c_args], c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, avahi_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, avahi_dep],
implicit_include_directories : false, # pulsecore/poll.h <vs> /usr/include/poll.h implicit_include_directories : false, # pulsecore/poll.h <vs> /usr/include/poll.h
...@@ -215,6 +217,7 @@ libcli = shared_library('cli', ...@@ -215,6 +217,7 @@ libcli = shared_library('cli',
'cli.c', 'cli.c',
'cli.h', 'cli.h',
c_args : [pa_c_args, server_c_args, database_c_args], c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true, install : true,
...@@ -227,6 +230,7 @@ libprotocol_cli = shared_library('protocol-cli', ...@@ -227,6 +230,7 @@ libprotocol_cli = shared_library('protocol-cli',
'protocol-cli.c', 'protocol-cli.c',
'protocol-cli.h', 'protocol-cli.h',
c_args : [pa_c_args, server_c_args, database_c_args], c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libcli_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libcli_dep],
install : true, install : true,
...@@ -237,6 +241,7 @@ libprotocol_http = shared_library('protocol-http', ...@@ -237,6 +241,7 @@ libprotocol_http = shared_library('protocol-http',
['protocol-http.c', 'mime-type.c'], ['protocol-http.c', 'mime-type.c'],
['protocol-http.h', 'mime-type.h'], ['protocol-http.h', 'mime-type.h'],
c_args : [pa_c_args, server_c_args, database_c_args], c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true, install : true,
...@@ -247,6 +252,7 @@ libprotocol_native = shared_library('protocol-native', ...@@ -247,6 +252,7 @@ libprotocol_native = shared_library('protocol-native',
'protocol-native.c', 'protocol-native.c',
['protocol-native.h', 'native-common.h'], ['protocol-native.h', 'native-common.h'],
c_args : [pa_c_args, server_c_args, database_c_args], c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep],
install : true, install : true,
...@@ -257,6 +263,7 @@ libprotocol_simple = shared_library('protocol-simple', ...@@ -257,6 +263,7 @@ libprotocol_simple = shared_library('protocol-simple',
'protocol-simple.c', 'protocol-simple.c',
'protocol-simple.h', 'protocol-simple.h',
c_args : [pa_c_args, server_c_args, database_c_args], c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep], dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true, install : true,
......
...@@ -88,7 +88,7 @@ if cc.has_header('sys/soundcard.h') ...@@ -88,7 +88,7 @@ if cc.has_header('sys/soundcard.h')
install_dir : padsplibdir, install_dir : padsplibdir,
include_directories : [configinc, topinc], include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse], link_with : [libpulsecommon, libpulse],
link_args : ['-ldl'], link_args : [nodelete_link_args, '-ldl'],
dependencies: [thread_dep], dependencies: [thread_dep],
c_args : [pa_c_args, '-Wno-nonnull-compare'] c_args : [pa_c_args, '-Wno-nonnull-compare']
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment