From cc85954bdcd0ac1a8ca15a71955ced1a5fe691ce Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 20 Sep 2009 21:37:02 +0100 Subject: Better workaround for GCC bug The problem triggered by CLAMP (see 692fd8a500e0f9eadc703b29b0c7550f57863e29) appears to be GCC bug #39501. A saner workaround than the previous one is to alter the compiler options. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index be06adf5e5..501295b29f 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,9 @@ dnl Add flags for gcc and g++ if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math" + # Work around GCC bug #39501 + CFLAGS="$CFLAGS -fno-finite-math-only" + # Enable -fvisibility=hidden if using a gcc that supports it save_CFLAGS="$CFLAGS" AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) @@ -111,6 +114,9 @@ fi if test "x$GXX" = xyes; then CXXFLAGS="$CXXFLAGS -Wall" + # Work around GCC bug #39501 + CXXFLAGS="$CXXFLAGS -fno-finite-math-only" + # Work around aliasing bugs - developers should comment this out CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" fi -- cgit v1.2.3