Only try to set -mpreferred-stack-boundary on i386.
Add -Wdeclaration-after-statement warning if supported.
This commit is contained in:
parent
a9a3bc7b14
commit
f8cb48b515
|
@ -11359,7 +11359,9 @@ _ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for gcc -mpreferred-stack-boundary=2 support" >&5
|
case $host_cpu in
|
||||||
|
*i[3456789]86*)
|
||||||
|
echo "$as_me:$LINENO: checking for gcc -mpreferred-stack-boundary=2 support" >&5
|
||||||
echo $ECHO_N "checking for gcc -mpreferred-stack-boundary=2 support... $ECHO_C" >&6
|
echo $ECHO_N "checking for gcc -mpreferred-stack-boundary=2 support... $ECHO_C" >&6
|
||||||
if test "${ac_cv_c_gcc_stack_boundary+set}" = set; then
|
if test "${ac_cv_c_gcc_stack_boundary+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
@ -11415,10 +11417,12 @@ CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_c_gcc_stack_boundary" >&5
|
echo "$as_me:$LINENO: result: $ac_cv_c_gcc_stack_boundary" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_gcc_stack_boundary" >&6
|
echo "${ECHO_T}$ac_cv_c_gcc_stack_boundary" >&6
|
||||||
if test "$ac_cv_c_gcc_stack_boundary" = "yes"
|
if test "$ac_cv_c_gcc_stack_boundary" = "yes"
|
||||||
then
|
then
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
|
EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for gcc -fno-strict-aliasing support" >&5
|
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
|
echo $ECHO_N "checking for gcc -fno-strict-aliasing support... $ECHO_C" >&6
|
||||||
|
@ -11542,6 +11546,67 @@ echo "${ECHO_T}$ac_cv_c_gcc_gstabs" >&6
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking for gcc -Wdeclaration-after-statement support" >&5
|
||||||
|
echo $ECHO_N "checking for gcc -Wdeclaration-after-statement support... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_c_gcc_decl_after_statement+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* 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>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||||
|
{ (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); }; } &&
|
||||||
|
{ 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_decl_after_statement="yes"
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_c_gcc_decl_after_statement="no"
|
||||||
|
fi
|
||||||
|
rm -f conftest.err 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_decl_after_statement" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_c_gcc_decl_after_statement" >&6
|
||||||
|
if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
|
||||||
|
then
|
||||||
|
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
|
||||||
|
fi
|
||||||
|
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
|
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
|
||||||
echo "$as_me:$LINENO: checking for broken string.h that generates warnings" >&5
|
echo "$as_me:$LINENO: checking for broken string.h that generates warnings" >&5
|
||||||
|
|
26
configure.ac
26
configure.ac
|
@ -799,13 +799,17 @@ int main(void) {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check for -mpreferred-stack-boundary
|
dnl Check for -mpreferred-stack-boundary
|
||||||
AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
|
case $host_cpu in
|
||||||
[WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
|
*i[[3456789]]86*)
|
||||||
ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
|
AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
|
||||||
if test "$ac_cv_c_gcc_stack_boundary" = "yes"
|
[WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
|
||||||
then
|
ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
|
if test "$ac_cv_c_gcc_stack_boundary" = "yes"
|
||||||
fi
|
then
|
||||||
|
EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl Check for -fno-strict-aliasing
|
dnl Check for -fno-strict-aliasing
|
||||||
AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
|
AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
|
||||||
|
@ -824,6 +828,14 @@ int main(void) {
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Check for -Wdeclaration-after-statement option
|
||||||
|
AC_CACHE_CHECK([for gcc -Wdeclaration-after-statement support], ac_cv_c_gcc_decl_after_statement,
|
||||||
|
[WINE_TRY_CFLAGS([-Wdeclaration-after-statement],ac_cv_c_gcc_decl_after_statement="yes", ac_cv_c_gcc_decl_after_statement="no")])
|
||||||
|
if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
|
||||||
|
then
|
||||||
|
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Check for noisy string.h
|
dnl Check for noisy string.h
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
|
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
|
||||||
|
|
Loading…
Reference in New Issue