[gtkhtml] Bug 626090 - Only set -fno-strict-aliasing for GCC
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug 626090 - Only set -fno-strict-aliasing for GCC
- Date: Thu, 5 Aug 2010 12:41:35 +0000 (UTC)
commit 9aef7ef27bda52bc8bb9fbc35deab5c047fc2429
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Aug 5 08:40:49 2010 -0400
Bug 626090 - Only set -fno-strict-aliasing for GCC
configure.ac | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8976af5..99a9f8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,13 +96,8 @@ 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.
-CFLAGS="$CFLAGS $WARNING_FLAGS -fno-strict-aliasing"
+dnl XXX This really belongs in AM_CPPFLAGS.
+CFLAGS="$CFLAGS $WARNING_FLAGS"
dnl *********************
dnl Necessary programs
@@ -117,6 +112,17 @@ AC_TYPE_SIZE_T
AC_CHECK_FUNCS([memchr memmove memset regcomp setlocale strchr strcspn strrchr strstr strtol strtoull])
AC_CHECK_HEADERS([fcntl.h libintl.h])
+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 libtool
dnl *****************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]