From: Ivan Maidanski Date: Thu, 15 Dec 2011 13:58:47 +0000 (+0400) Subject: Regenerate configure; update ChangeLog X-Git-Tag: gc7_2~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a50ef481b3b4772bfde8f813a223c013a25d86d6;p=gc Regenerate configure; update ChangeLog --- diff --git a/ChangeLog b/ChangeLog index c817f3dd..4f9aec48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2011-12-15 Ivan Maidanski + + * configure: Regenerate. + +2011-12-15 Ivan Maidanski + + * 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 * configure: Regenerate. diff --git a/configure b/configure index fc799aff..2512038b 100755 --- 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.