[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] Commit fd9e3452 removed -ffast-math from the compile flags. Under some
Arun Raghavan
gitlab at gitlab.freedesktop.org
Tue Jul 23 20:53:01 UTC 2019
Arun Raghavan pushed to branch master at PulseAudio / pulseaudio
Commits:
3929798a by Georg Chini at 2019-07-23T20:48:23Z
Commit fd9e3452 removed -ffast-math from the compile flags. Under some
conditions this may lead to massive slowdown of floating point operations
when underflows or denormals are encountered. In particular, this problem
was observed with the soxr resampler after applying
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/120
Therefore this patch adds -ffast-math to the link flags of the pulseaudio
daemon. Linking with -ffast-math adds a procedure set_fast_math() to the
startup code of the daemon. On x86, the procedure sets bit 6 and 15 of the
mxcsr register. When these bits are set, denormals and results of
underflowing operations are truncated to 0.
- - - - -
2 changed files:
- src/Makefile.am
- src/daemon/meson.build
Changes:
=====================================
src/Makefile.am
=====================================
@@ -175,9 +175,9 @@ PREOPEN_LIBS = $(modlibexec_LTLIBRARIES)
endif
if FORCE_PREOPEN
-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
+pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -ffast-math -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
else
-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
+pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -ffast-math -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
endif
if HAVE_SYSTEMD_DAEMON
=====================================
src/daemon/meson.build
=====================================
@@ -28,6 +28,7 @@ executable('pulseaudio',
pulseaudio_headers,
install: true,
include_directories : [configinc, topinc],
+ link_args : ['-ffast-math'],
link_with : [libpulsecore, libpulsecommon, libpulse],
dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep],
c_args : pa_c_args,
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/3929798a53c6fbc83b3d54d801c1c07cee4c78f5
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/3929798a53c6fbc83b3d54d801c1c07cee4c78f5
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/20190723/1a55ecea/attachment.html>
More information about the pulseaudio-commits
mailing list