Add -fno-unsafe-math-optimizations to CFLAGS.

It seems -ffast-math is not necessarily faster, and the errors it causes
may not be worth the gains, but I'm not sure I want to nuke it completely,
so instead disabling the worst offender of it
(-fno-unsafe-math-optimizations) seems to be the best option. qfbsp now
produces identical text output between optimized and unoptimized builds,
and may be slightly faster than before the change (1.9s for start.map vs
2.0s)
This commit is contained in:
Bill Currie 2012-12-30 16:26:36 +09:00
parent acd25fb7bb
commit 9028cda24b

View file

@ -72,7 +72,7 @@ if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then
if test "$CC_MAJ" -ge 4; then
QF_CC_OPTION(-finline-limit=32000 -Winline)
fi
heavy="-O2 $CFLAGS -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
heavy="-O2 $CFLAGS -ffast-math -fno-unsafe-math-optimizations -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
CFLAGS="$saved_cflags"
light="-O2"
AC_ARG_ENABLE(strict-aliasing,