[PATCH] remove -ffast-math from CFLAGS and LDFLAGS in configure script
Mike Lieman <[email protected]> Sat, 17 Aug 2024 18:34:26 -0400
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <CAG2_C8AYWoWo8ib_+9eE-aeh0Df0VtGPT=w=E=mPjMuESKrcDQ@mail.gmail.com> |
The ticket "Video files suddenly take 100s before playback starts" (
https://trac.mplayerhq.hu/ticket/2425 ) describes long startup times with
some files between 10 and 100 seconds.
It began after a change to ffmpeg which uses negative infinity, and the
fast-math library had been optimizing it in a way that spent an inordinate
amount of time in the subsequent loops.
Many people consider the fast-math library dangerous, and we see an example
of why that is so right here.
But simply doing floating point math correctly, the issue is resolved.
This patch removes the fast-math library.
Index: configure
===================================================================
--- configure (revision 38637)
+++ configure (working copy)
@@ -2969,10 +2969,10 @@
elif test "$cc_vendor" != "gnu" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe"
else
- CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
+ CFLAGS="-O4 $_march $_mcpu $_pipe -fomit-frame-pointer"
WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith
-Wredundant-decls -Werror=format-security"
WARN_CFLAGS="-Werror-implicit-function-declaration"
- extra_ldflags="$extra_ldflags -ffast-math"
+ extra_ldflags="$extra_ldflags"
fi
if test "$_profile" != "" || test "$_debug" != ""; then