[evolution-exchange] Bug 626090 - Only set -fno-strict-aliasing for GCC



commit 67d1d0346e2b2b809663bf6e0e8806d9edfb60ba
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Aug 5 08:45:51 2010 -0400

    Bug 626090 - Only set -fno-strict-aliasing for GCC

 configure.ac |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd15044..4491291 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,12 +91,6 @@ dnl	-Wmissing-format-attribute
 dnl	-Wshadow
 dnl	-Wstrict-aliasing=2
 
-dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
-dnl behavior that -- according to the C99 standard -- is supposed to be
-dnl undefined.  We may still have aliasing abuses lying around that rely
-dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
-dnl optimization until we can find and fix all the abuses.
-dnl XXX This really belongs in AM_CFLAGS.
 AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
 AC_SUBST(AM_CPPFLAGS)
 
@@ -111,6 +105,17 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 
+dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
+dnl behavior that -- according to the C99 standard -- is supposed to be
+dnl undefined.  We may still have aliasing abuses lying around that rely
+dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
+dnl optimization until we can find and fix all the abuses.
+dnl (AC_PROG_CC must run first to set the GCC variable.)
+dnl XXX This really belongs in AM_CFLAGS.
+if test "x${GCC}" = "xyes"; then
+	CFLAGS="$CFLAGS -fno-strict-aliasing"
+fi
+
 dnl ******************************
 dnl Check for Win32
 dnl ******************************



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]