[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 6 commits: build-sys: meson: Add -Wl, no-delete to relevant libraries
Arun Raghavan
gitlab at gitlab.freedesktop.org
Tue Aug 6 08:24:41 UTC 2019
Arun Raghavan pushed to branch master at PulseAudio / pulseaudio
Commits:
f996ad06 by Arun Raghavan at 2019-08-05T04:22:32Z
build-sys: meson: Add -Wl,no-delete to relevant libraries
This mirrors the autotools option for all server-side dynamic libraries.
- - - - -
7f44a623 by Arun Raghavan at 2019-08-05T04:22:32Z
build-sys: meson: Correctly set up RPATH
This was being done automatically by autotools, now we need to manually
specify this for each executable/library with a dependency in a
non-standard directory.
- - - - -
34a8c3aa by Arun Raghavan at 2019-08-05T05:00:50Z
build-sys: meson: Fix some defines for default.pa generation
Removes a warning from HAVE_GCONF not being set, and fixes generation of
a large section that depends on OS_IS_WIN32 being explicitly set to 0.
We can't set OS_IS_WIN32 to 0 by default since a bunch of code uses it
via an ifdef rather than by value.
- - - - -
0d7e351f by Arun Raghavan at 2019-08-05T05:10:25Z
build-sys: meson: Add symbol versioning as in autotools
Adds the -version-script linker argument that we use with autotools to
version symbols in our public API.
- - - - -
f52baffe by Arun Raghavan at 2019-08-05T08:39:44Z
build-sys: meson: Fix minor typo in orc build
- - - - -
6a1addf3 by Arun Raghavan at 2019-08-05T08:49:27Z
build-sys: Move svolume-*.c to libpulsecore
The various software volume implementations were being built as part of
libpulsecommon for some reason. These should only ever be used in the
daemon, so they should be in libpulsecore.
- - - - -
15 changed files:
- meson.build
- src/Makefile.am
- src/daemon/meson.build
- src/meson.build
- src/modules/alsa/meson.build
- src/modules/bluetooth/meson.build
- src/modules/echo-cancel/meson.build
- src/modules/gsettings/meson.build
- src/modules/meson.build
- src/modules/oss/meson.build
- src/modules/raop/meson.build
- src/modules/rtp/meson.build
- src/pulse/meson.build
- src/pulsecore/meson.build
- src/utils/meson.build
Changes:
=====================================
meson.build
=====================================
@@ -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')
=====================================
src/Makefile.am
=====================================
@@ -753,8 +753,6 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = \
pulsecore/socket-util.c pulsecore/socket-util.h \
pulsecore/strbuf.c pulsecore/strbuf.h \
pulsecore/strlist.c pulsecore/strlist.h \
- pulsecore/svolume_c.c pulsecore/svolume_arm.c \
- pulsecore/svolume_mmx.c pulsecore/svolume_sse.c \
pulsecore/tagstruct.c pulsecore/tagstruct.h \
pulsecore/time-smoother.c pulsecore/time-smoother.h \
pulsecore/tokenizer.c pulsecore/tokenizer.h \
@@ -1005,6 +1003,8 @@ libpulsecore_ at PA_MAJORMINOR@_la_SOURCES = \
pulsecore/resampler/trivial.c \
pulsecore/rtpoll.c pulsecore/rtpoll.h \
pulsecore/stream-util.c pulsecore/stream-util.h \
+ pulsecore/svolume_c.c pulsecore/svolume_arm.c \
+ pulsecore/svolume_mmx.c pulsecore/svolume_sse.c \
pulsecore/mix.c pulsecore/mix.h \
pulsecore/cpu.c pulsecore/cpu.h \
pulsecore/cpu-arm.c pulsecore/cpu-arm.h \
=====================================
src/daemon/meson.build
=====================================
@@ -27,6 +27,7 @@ executable('pulseaudio',
pulseaudio_sources,
pulseaudio_headers,
install: true,
+ install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_args : ['-ffast-math'],
link_with : [libpulsecore, libpulsecommon, libpulse],
@@ -92,6 +93,9 @@ default_conf.merge_from(cdata)
default_conf.set('PA_BINARY', cdata.get_unquoted('PA_BINARY'))
default_conf.set('PA_SOEXT', cdata.get_unquoted('PA_SOEXT'))
default_conf.set10('HAVE_AF_UNIX', cc.has_header('sys/un.h'))
+default_conf.set10('OS_IS_WIN32', host_machine.system() == 'windows')
+# We don't support the deprecated GConf option in meson
+default_conf.set10('HAVE_GCONF', 0)
default_template_file = configure_file(
input : 'default.pa.in',
=====================================
src/meson.build
=====================================
@@ -61,15 +61,12 @@ libpulsecommon_sources = [
'pulsecore/socket-util.c',
'pulsecore/strbuf.c',
'pulsecore/strlist.c',
- 'pulsecore/svolume_c.c',
- 'pulsecore/svolume_mmx.c',
'pulsecore/tagstruct.c',
'pulsecore/thread-posix.c',
'pulsecore/time-smoother.c',
'pulsecore/tokenizer.c',
'pulsecore/usergroup.c',
'pulsecore/sndfile-util.c',
- 'pulsecore/svolume_arm.c',
]
libpulsecommon_headers = [
@@ -181,6 +178,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],
=====================================
src/modules/alsa/meson.build
=====================================
@@ -30,9 +30,11 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
=====================================
src/modules/bluetooth/meson.build
=====================================
@@ -24,8 +24,10 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
=====================================
src/modules/echo-cancel/meson.build
=====================================
@@ -15,7 +15,8 @@ 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_rpath : privlibdir,
install_dir : modlibexecdir,
)
=====================================
src/modules/gsettings/meson.build
=====================================
@@ -11,6 +11,7 @@ gsettings_helper = executable('gsettings-helper',
link_with : [libpulsecommon, libpulse],
dependencies : [gio_dep],
install_dir : pulselibexecdir,
+ install_rpath : privlibdir,
install : true,
)
=====================================
src/modules/meson.build
=====================================
@@ -259,6 +259,10 @@ all_modules += [
# Generate a shared module object for each modules
+# FIXME: Not all modules actually have a dep in modlibexecdir
+# FIXME: meson doesn't support multiple RPATH arguments currently
+rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
+
foreach m : all_modules
name = m[0]
sources = m[1]
@@ -273,9 +277,10 @@ foreach m : all_modules
include_directories : [configinc, topinc],
c_args : [pa_c_args, server_c_args, '-DPA_MODULE_NAME=' + name.underscorify()] + extra_flags,
install : true,
+ install_rpath : rpath_dirs,
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)
=====================================
src/modules/oss/meson.build
=====================================
@@ -13,5 +13,6 @@ liboss_util = shared_library('oss-util',
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
install : true,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
=====================================
src/modules/raop/meson.build
=====================================
@@ -14,12 +14,17 @@ libraop_headers = [
'raop-util.h',
]
+# FIXME: meson doesn't support multiple RPATH arguments currently
+rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
+
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,
+ install_rpath : rpath_dirs,
install_dir : modlibexecdir,
)
=====================================
src/modules/rtp/meson.build
=====================================
@@ -18,9 +18,11 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
=====================================
src/pulse/meson.build
=====================================
@@ -70,13 +70,17 @@ if glib_dep.found()
libpulse_headers += 'glib-mainloop.h'
endif
+versioning_link_args = '-Wl,-version-script=' + join_paths(meson.source_root(), 'src', 'map-file')
+
libpulse = shared_library('pulse',
libpulse_sources,
libpulse_headers,
version : libpulse_version,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
+ link_args : [nodelete_link_args, versioning_link_args],
install : true,
+ install_rpath : privlibdir,
dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep],
implicit_include_directories : false)
@@ -92,9 +96,11 @@ libpulse_simple = shared_library('pulse-simple',
'simple.h',
version : libpulse_simple_version,
c_args : [pa_c_args],
+ link_args : [nodelete_link_args, versioning_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep],
install : true,
+ install_rpath : privlibdir,
)
libpulse_simple_dep = declare_dependency(link_with: libpulse_simple)
@@ -105,9 +111,11 @@ if glib_dep.found()
'glib-mainloop.h',
version : libpulse_mainloop_glib_version,
c_args : [pa_c_args],
+ link_args : [nodelete_link_args, versioning_link_args],
include_directories : [configinc, topinc],
dependencies : [libpulse_dep, libpulsecommon_dep, glib_dep],
install : true,
+ install_rpath : privlibdir,
)
libpulse_mainloop_glib_dep = declare_dependency(link_with: libpulse_mainloop_glib)
=====================================
src/pulsecore/meson.build
=====================================
@@ -49,6 +49,10 @@ libpulsecore_sources = [
'source-output.c',
'start-child.c',
'stream-util.c',
+ 'svolume_arm.c',
+ 'svolume_c.c',
+ 'svolume_mmx.c',
+ 'svolume_sse.c',
'thread-mq.c',
]
@@ -149,7 +153,7 @@ orc_sources = []
orc_headers = []
if have_orcc
orcsrc = 'svolume'
- orc_h = custom_target(orcsrc + '-ocr-gen.h',
+ orc_h = custom_target(orcsrc + '-orc-gen.h',
input : orcsrc + '.orc',
output : orcsrc + '-orc-gen.h',
command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
@@ -189,7 +193,9 @@ 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_rpath : privlibdir,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
@@ -204,10 +210,12 @@ 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
install : true,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
@@ -215,21 +223,28 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
libcli_dep = declare_dependency(link_with: libcli)
+# FIXME: meson doesn't support multiple RPATH arguments currently
+rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
+
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,
+ install_rpath : rpath_dirs,
install_dir : modlibexecdir,
)
@@ -237,9 +252,11 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
@@ -247,9 +264,11 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
@@ -257,8 +276,10 @@ 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,
+ install_rpath : privlibdir,
install_dir : modlibexecdir,
)
=====================================
src/utils/meson.build
=====================================
@@ -12,6 +12,7 @@ pacat_aliases = [
executable('pacat',
pacat_sources,
install: true,
+ install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
dependencies : [sndfile_dep],
@@ -32,6 +33,7 @@ pactl_sources = [
executable('pactl',
pactl_sources,
install: true,
+ install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
dependencies : [sndfile_dep],
@@ -45,6 +47,7 @@ pasuspender_sources = [
executable('pasuspender',
pasuspender_sources,
install: true,
+ install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
c_args : pa_c_args,
@@ -57,6 +60,7 @@ pacmd_sources = [
executable('pacmd',
pacmd_sources,
install: true,
+ install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
c_args : pa_c_args,
@@ -70,6 +74,7 @@ if x11_dep.found()
executable('pax11publish',
pax11publish_sources,
install: true,
+ install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
dependencies : [x11_dep],
@@ -86,9 +91,10 @@ if cc.has_header('sys/soundcard.h')
libpulsecommon_sources,
install: true,
install_dir : padsplibdir,
+ install_rpath : privlibdir,
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']
)
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/compare/d8927b0e533509fcf04b83a542bd5d2e380c67a9...6a1addf35ca7308833371a69a09769607448c657
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/compare/d8927b0e533509fcf04b83a542bd5d2e380c67a9...6a1addf35ca7308833371a69a09769607448c657
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20190806/1f04e1c1/attachment-0001.html>
More information about the pulseaudio-commits
mailing list