summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac11
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 92224633..f2dbb645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-19 Marcus Brinkmann <marcus@g10code.de>
+
+ * configure.ac: Check for -fno-strict-aliasing.
+
2010-04-12 Brad Hards <bradh@frogmouth.net> (wk)
* configure.ac: Print more verbose info at the end.
diff --git a/configure.ac b/configure.ac
index 65e29cdb..d05c9cb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -928,6 +928,17 @@ if test "$GCC" = yes; then
if test x"$_gcc_wopt" = xyes ; then
CFLAGS="$CFLAGS -Wpointer-arith"
fi
+
+ AC_MSG_CHECKING([if gcc supports -fno-strict-aliasing])
+ _gcc_cflags_save=$CFLAGS
+ CFLAGS="-fno-strict-aliasing"
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
+ AC_MSG_RESULT($_gcc_wopt)
+ CFLAGS=$_gcc_cflags_save;
+ if test x"$_gcc_wopt" = xyes ; then
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+ fi
+
fi
fi