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

This mirrors the autotools option for all server-side dynamic libraries.
This commit is contained in:
Arun Raghavan 2019-08-03 01:52:09 +05:30
parent d8927b0e53
commit f996ad0688
11 changed files with 24 additions and 4 deletions

View File

@ -286,12 +286,17 @@ cdata.set('GETGROUPS_T', 'gid_t')
configinc = include_directories('.')
topinc = include_directories('src')
# CFLAGS
# CFLAGS/LDFLAGS
pa_c_args = ['-DHAVE_CONFIG_H', '-D_GNU_SOURCE']
server_c_args = ['-D__INCLUDED_FROM_PULSE_AUDIO']
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
if get_option('gcov')

View File

@ -181,6 +181,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_headers,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true,
install_dir : privlibdir,
dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep],

View File

@ -30,6 +30,7 @@ libalsa_util = shared_library('alsa-util',
libalsa_util_sources,
libalsa_util_headers,
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, alsa_dep, dbus_dep, libm_dep, udev_dep],
install : true,

View File

@ -24,6 +24,7 @@ libbluez5_util = shared_library('bluez5-util',
libbluez5_util_sources,
libbluez5_util_headers,
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep],
install : true,

View File

@ -15,7 +15,7 @@ libwebrtc_util = shared_library('webrtc-util',
cpp_args : [pa_c_args, server_c_args],
include_directories : [configinc, topinc],
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_dir : modlibexecdir,
)

View File

@ -275,7 +275,7 @@ foreach m : all_modules
install : true,
install_dir : modlibexecdir,
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,
name_prefix : '',
implicit_include_directories : false)

View File

@ -18,6 +18,7 @@ libraop = shared_library('raop',
libraop_sources,
libraop_headers,
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, librtp_dep, openssl_dep],
install : true,

View File

@ -18,6 +18,7 @@ librtp = shared_library('rtp',
librtp_sources,
librtp_headers,
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,

View File

@ -76,6 +76,7 @@ libpulse = shared_library('pulse',
version : libpulse_version,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true,
dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep],
implicit_include_directories : false)
@ -92,6 +93,7 @@ libpulse_simple = shared_library('pulse-simple',
'simple.h',
version : libpulse_simple_version,
c_args : [pa_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep],
install : true,
@ -105,6 +107,7 @@ if glib_dep.found()
'glib-mainloop.h',
version : libpulse_mainloop_glib_version,
c_args : [pa_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep],
install : true,

View File

@ -189,6 +189,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
orc_sources, orc_headers,
include_directories : [configinc, topinc],
c_args : [pa_c_args, server_c_args],
link_args : [nodelete_link_args],
install : true,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
@ -204,6 +205,7 @@ libavahi_wrap = shared_library('avahi-wrap',
'avahi-wrap.c',
'avahi-wrap.h',
c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, avahi_dep],
implicit_include_directories : false, # pulsecore/poll.h <vs> /usr/include/poll.h
@ -215,6 +217,7 @@ libcli = shared_library('cli',
'cli.c',
'cli.h',
c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
@ -227,6 +230,7 @@ libprotocol_cli = shared_library('protocol-cli',
'protocol-cli.c',
'protocol-cli.h',
c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libcli_dep],
install : true,
@ -237,6 +241,7 @@ libprotocol_http = shared_library('protocol-http',
['protocol-http.c', 'mime-type.c'],
['protocol-http.h', 'mime-type.h'],
c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
@ -247,6 +252,7 @@ libprotocol_native = shared_library('protocol-native',
'protocol-native.c',
['protocol-native.h', 'native-common.h'],
c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep],
install : true,
@ -257,6 +263,7 @@ libprotocol_simple = shared_library('protocol-simple',
'protocol-simple.c',
'protocol-simple.h',
c_args : [pa_c_args, server_c_args, database_c_args],
link_args : [nodelete_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,

View File

@ -88,7 +88,7 @@ if cc.has_header('sys/soundcard.h')
install_dir : padsplibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
link_args : ['-ldl'],
link_args : [nodelete_link_args, '-ldl'],
dependencies: [thread_dep],
c_args : [pa_c_args, '-Wno-nonnull-compare']
)