]> granicus.if.org Git - gc/commitdiff
Regenerate configure; update ChangeLog
authorIvan Maidanski <ivmai@mail.ru>
Thu, 15 Dec 2011 13:58:47 +0000 (17:58 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 15 Dec 2011 13:58:47 +0000 (17:58 +0400)
ChangeLog
configure

index c817f3dd8a00cfd90172cfc05c54be8b9da9f2e4..4f9aec487d07f385f4c16c874b6c864e9142e9b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-12-15  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure: Regenerate.
+
+2011-12-15  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure.ac (ac_cv_fno_strict_aliasing): New variable (set to
+       "skipped" if the client passed "-fstrict-aliasing" option to CFLAGS
+       else set to "yes" if GCC supports "-fno-strict-aliasing" option,
+       otherwise set to "no").
+       * configure.ac (CFLAGS): Append "-fno-strict-aliasing" if
+       ac_cv_fno_strict_aliasing is "yes" (only if GCC).
+
 2011-12-13  Ivan Maidanski <ivmai@mail.ru>
 
        * configure: Regenerate.
index fc799aff9993d11012e43e46c26fb47f278980af..2512038b5928115ea2842bc98eabde22f432a3e4 100755 (executable)
--- a/configure
+++ b/configure
@@ -5241,6 +5241,47 @@ $as_echo "#define DARWIN_DONT_PARSE_STACK 1" >>confdefs.h
 
 fi
 
+if test "$GCC" == yes; then
+  # Disable aliasing optimization unless forced to.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports -fno-strict-aliasing" >&5
+$as_echo_n "checking whether gcc supports -fno-strict-aliasing... " >&6; }
+  ac_cv_fno_strict_aliasing=no
+  for cflag in $CFLAGS; do
+    case "$cflag" in
+      -fstrict-aliasing)
+        # Opposite option already present
+        ac_cv_fno_strict_aliasing=skipped
+        break
+        ;;
+    esac
+  done
+  if test "$ac_cv_fno_strict_aliasing" != skipped; then
+    old_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -fno-strict-aliasing"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_fno_strict_aliasing=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$old_CFLAGS"
+    if test "$ac_cv_fno_strict_aliasing" = yes; then :
+  CFLAGS="$CFLAGS -fno-strict-aliasing"
+fi
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fno_strict_aliasing" >&5
+$as_echo "$ac_cv_fno_strict_aliasing" >&6; }
+fi
+
 case "$host" in
 # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
 # and unnecessary everywhere.