autoconf: Use -fno-strict-aliasing on GCC
authorDan Nicholson <dbn.lists@gmail.com>
Wed, 16 Jan 2008 06:52:25 +0000 (22:52 -0800)
committerDan Nicholson <dbn.lists@gmail.com>
Wed, 16 Jan 2008 06:53:18 +0000 (22:53 -0800)
This change adds -fno-strict-aliasing when using gcc and g++, just like
the existing configs.

configure.ac

index 1a2a2cb46a9defa7e6086eb29cc11206237ce610..89328486b4a570f7e3fa7b770aa1a9642e4e44ef 100644 (file)
@@ -66,9 +66,15 @@ esac
 dnl Add flags for gcc and g++
 if test "x$GCC" = xyes; then
     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
+
+    # Work around aliasing bugs - developers should comment this out
+    CFLAGS="$CFLAGS -fno-strict-aliasing"
 fi
 if test "x$GXX" = xyes; then
     CXXFLAGS="$CXXFLAGS -Wall"
+
+    # Work around aliasing bugs - developers should comment this out
+    CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
 fi
 
 dnl These should be unnecessary, but let the user set them if they want