1
A bug present in gcc-4.[123] up to 4.3.3 makes a buggy optimization for
2
single-precision floats when -ffinite-math-only (enabled by -ffast-math)
4
Symptom: lame -V0 produces silent output files.
6
https://sourceforge.net/tracker/index.php?func=detail&aid=2681646&group_id=290&atid=100290
7
https://trac.xiph.org/ticket/1526
8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
10
Martin Guy <martinwguy@yahoo.it> 19 March 2009
12
--- lame-3.98.2/configure.old 2008-06-29 22:40:05.000000000 +0100
13
+++ lame-3.98.2/configure 2009-03-19 19:00:42.000000000 +0000
14
@@ -30189,6 +30189,15 @@
15
CFLAGS="-Wall ${CFLAGS}"
18
+ # Work round buggy softfloat optimization in ARM EABI compilers
19
+ # -gnueabi in only gcc-4.1 onwards
20
+ FAST_MATH="-ffast-math"
23
+ FAST_MATH="-ffast-math -fno-finite-math-only"
27
# GCC version specific generic options
28
case "${GCC_version}" in
30
@@ -30217,12 +30226,12 @@
34
- OPTIMIZATION="-O3 ${OMIT_FRAME_POINTER} -ffast-math"
35
+ OPTIMIZATION="-O3 ${OMIT_FRAME_POINTER} ${FAST_MATH}"
36
OPTIMIZATION_FULL="-fmove-all-movables -freduce-all-givs \
37
-fbranch-count-reg -fforce-addr -fforce-mem"
40
- OPTIMIZATION="-O3 -fomit-frame-pointer -ffast-math"
41
+ OPTIMIZATION="-O3 -fomit-frame-pointer ${FAST_MATH}"
42
OPTIMIZATION_FULL="-fbranch-count-reg -fforce-addr"