From efca0f6a9185e9e8d2b744b2ce6c340d5a662461 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 24 Jul 2003 00:09:51 +0000 Subject: [PATCH] Disable gcc strict aliasing optimization for now. --- configure | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 9 +++++++++ 2 files changed, 61 insertions(+) diff --git a/configure b/configure index f8f699114f3..d3bb9532256 100755 --- a/configure +++ b/configure @@ -10973,6 +10973,58 @@ echo "${ECHO_T}$ac_cv_c_gcc_stack_boundary" >&6 EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2" fi + echo "$as_me:$LINENO: checking for gcc -fno-strict-aliasing support" >&5 +echo $ECHO_N "checking for gcc -fno-strict-aliasing support... $ECHO_C" >&6 +if test "${ac_cv_c_gcc_no_strict_aliasing+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -fno-strict-aliasing" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_gcc_no_strict_aliasing="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_gcc_no_strict_aliasing="no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved +fi +echo "$as_me:$LINENO: result: $ac_cv_c_gcc_no_strict_aliasing" >&5 +echo "${ECHO_T}$ac_cv_c_gcc_no_strict_aliasing" >&6 + if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes" + then + EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing" + fi + echo "$as_me:$LINENO: checking for gcc -gstabs+ support" >&5 echo $ECHO_N "checking for gcc -gstabs+ support... $ECHO_C" >&6 if test "${ac_cv_c_gcc_gstabs+set}" = set; then diff --git a/configure.ac b/configure.ac index c358c4a01fb..8f718b3e887 100644 --- a/configure.ac +++ b/configure.ac @@ -695,6 +695,15 @@ int main(void) { EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2" fi + dnl Check for -fno-strict-aliasing + AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing, + [WINE_TRY_CFLAGS([-fno-strict-aliasing], + ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")]) + if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes" + then + EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing" + fi + dnl Check for -gstabs+ option AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs, [WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])