[pulseaudio-commits] configure.ac src/daemon
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Fri Jan 26 02:14:12 UTC 2018
configure.ac | 3 +++
src/daemon/main.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 6d7e057b3739c365964892296a9cf4fc075bc844
Author: Vivek Dasmohapatra <vivek at collabora.co.uk>
Date: Fri Jan 26 03:58:19 2018 +0200
daemon: don't re-exec if the linker supports the -z,now option
Usually PulseAudio is built with a linker that supports the -z,now
option, and that option should have the same effect (i.e. the dynamic
linker resolves all symbols when the program is started) as re-execing
with the LD_BIND_NOW environment variable set, so usually the re-execing
is redundant.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104789
diff --git a/configure.ac b/configure.ac
index 2a820b91..0084c86e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,6 +213,9 @@ AC_SUBST([VERSIONING_LDFLAGS])
# The -z now syntax is lifted from Sun's linker and works with GNU's too, other linkers might be added later.
AX_APPEND_LINK_FLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS])
AC_SUBST([IMMEDIATE_LDFLAGS])
+AS_CASE([$IMMEDIATE_LDFLAGS],[*-z,now*],
+ [AC_DEFINE([HAVE_BIND_NOW],[1],
+ [Define to 1 if immediate binding is available])])
# 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.
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 55af4eca..c80fa943 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -397,7 +397,7 @@ int main(int argc, char *argv[]) {
pa_log_set_level(PA_LOG_NOTICE);
pa_log_set_flags(PA_LOG_COLORS|PA_LOG_PRINT_FILE|PA_LOG_PRINT_LEVEL, PA_LOG_RESET);
-#if defined(__linux__) && defined(__OPTIMIZE__)
+#if !defined(HAVE_BIND_NOW) && defined(__linux__) && defined(__OPTIMIZE__)
/*
Disable lazy relocations to make usage of external libraries
more deterministic for our RT threads. We abuse __OPTIMIZE__ as
More information about the pulseaudio-commits
mailing list