configure: Use cross compiler for EXCESS_PRECISION_CFLAGS check when available.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2819fea352
commit
69bc1fe4bc
|
@ -631,7 +631,6 @@ RT_LIBS
|
|||
POLL_LIBS
|
||||
TOOLSEXT
|
||||
MSVCRTFLAGS
|
||||
EXCESS_PRECISION_CFLAGS
|
||||
EXTRACFLAGS
|
||||
VKD3D_LIBS
|
||||
VKD3D_CFLAGS
|
||||
|
@ -705,6 +704,7 @@ X_PRE_LIBS
|
|||
X_CFLAGS
|
||||
XMKMF
|
||||
PTHREAD_LIBS
|
||||
EXCESS_PRECISION_CFLAGS
|
||||
CROSSDEBUG
|
||||
DELAYLOADFLAG
|
||||
CROSSLDFLAGS
|
||||
|
@ -9982,6 +9982,37 @@ fi
|
|||
$as_echo "$ac_cv_crosscflags__Werror_unknown_warning_option" >&6; }
|
||||
if test "x$ac_cv_crosscflags__Werror_unknown_warning_option" = xyes; then :
|
||||
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -Werror=ignored-optimization-argument" >&5
|
||||
$as_echo_n "checking whether the cross-compiler supports -Werror=ignored-optimization-argument... " >&6; }
|
||||
if ${ac_cv_crosscflags__Werror_ignored_optimization_argument+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
ac_wine_try_cflags_saved_cc=$CC
|
||||
ac_wine_try_cflags_saved_exeext=$ac_exeext
|
||||
CFLAGS="$CFLAGS $EXTRACROSSCFLAGS -nostartfiles -nodefaultlibs -Werror=ignored-optimization-argument"
|
||||
CC="$CROSSCC"
|
||||
ac_exeext=".exe"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int __cdecl mainCRTStartup(void) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_crosscflags__Werror_ignored_optimization_argument=yes
|
||||
else
|
||||
ac_cv_crosscflags__Werror_ignored_optimization_argument=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
CC=$ac_wine_try_cflags_saved_cc
|
||||
ac_exeext=$ac_wine_try_cflags_saved_exeext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crosscflags__Werror_ignored_optimization_argument" >&5
|
||||
$as_echo "$ac_cv_crosscflags__Werror_ignored_optimization_argument" >&6; }
|
||||
if test "x$ac_cv_crosscflags__Werror_ignored_optimization_argument" = xyes; then :
|
||||
CFLAGS="$CFLAGS -Werror=ignored-optimization-argument"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -Wdeclaration-after-statement" >&5
|
||||
$as_echo_n "checking whether the cross-compiler supports -Wdeclaration-after-statement... " >&6; }
|
||||
|
@ -10652,6 +10683,39 @@ if test "x$ac_cv_crosscflags__gcodeview" = xyes; then :
|
|||
fi ;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -fexcess-precision=standard" >&5
|
||||
$as_echo_n "checking whether the cross-compiler supports -fexcess-precision=standard... " >&6; }
|
||||
if ${ac_cv_crosscflags__fexcess_precision_standard+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
ac_wine_try_cflags_saved_cc=$CC
|
||||
ac_wine_try_cflags_saved_exeext=$ac_exeext
|
||||
CFLAGS="$CFLAGS $EXTRACROSSCFLAGS -nostartfiles -nodefaultlibs -fexcess-precision=standard"
|
||||
CC="$CROSSCC"
|
||||
ac_exeext=".exe"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int __cdecl mainCRTStartup(void) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_crosscflags__fexcess_precision_standard=yes
|
||||
else
|
||||
ac_cv_crosscflags__fexcess_precision_standard=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
CC=$ac_wine_try_cflags_saved_cc
|
||||
ac_exeext=$ac_wine_try_cflags_saved_exeext
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crosscflags__fexcess_precision_standard" >&5
|
||||
$as_echo "$ac_cv_crosscflags__fexcess_precision_standard" >&6; }
|
||||
if test "x$ac_cv_crosscflags__fexcess_precision_standard" = xyes; then :
|
||||
EXCESS_PRECISION_CFLAGS="-fexcess-precision=standard"
|
||||
|
||||
fi
|
||||
|
||||
if test "x$enable_werror" = "xyes"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -Werror" >&5
|
||||
|
@ -17177,32 +17241,6 @@ fi
|
|||
$as_echo "$ac_cv_cflags__fno_strict_aliasing" >&6; }
|
||||
if test "x$ac_cv_cflags__fno_strict_aliasing" = xyes; then :
|
||||
EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fexcess-precision=standard" >&5
|
||||
$as_echo_n "checking whether the compiler supports -fexcess-precision=standard... " >&6; }
|
||||
if ${ac_cv_cflags__fexcess_precision_standard+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
CFLAGS="$CFLAGS -fexcess-precision=standard"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int main(int argc, char **argv) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_cflags__fexcess_precision_standard=yes
|
||||
else
|
||||
ac_cv_cflags__fexcess_precision_standard=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fexcess_precision_standard" >&5
|
||||
$as_echo "$ac_cv_cflags__fexcess_precision_standard" >&6; }
|
||||
if test "x$ac_cv_cflags__fexcess_precision_standard" = xyes; then :
|
||||
EXCESS_PRECISION_CFLAGS="-fexcess-precision=standard"
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wdeclaration-after-statement" >&5
|
||||
$as_echo_n "checking whether the compiler supports -Wdeclaration-after-statement... " >&6; }
|
||||
|
@ -17480,6 +17518,36 @@ if test "x$ac_cv_cflags__Wwrite_strings" = xyes; then :
|
|||
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
|
||||
fi
|
||||
|
||||
if test -z "$CROSSTARGET"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fexcess-precision=standard" >&5
|
||||
$as_echo_n "checking whether the compiler supports -fexcess-precision=standard... " >&6; }
|
||||
if ${ac_cv_cflags__fexcess_precision_standard+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_wine_try_cflags_saved=$CFLAGS
|
||||
CFLAGS="$CFLAGS -fexcess-precision=standard"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int main(int argc, char **argv) { return 0; }
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_cflags__fexcess_precision_standard=yes
|
||||
else
|
||||
ac_cv_cflags__fexcess_precision_standard=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ac_wine_try_cflags_saved
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fexcess_precision_standard" >&5
|
||||
$as_echo "$ac_cv_cflags__fexcess_precision_standard" >&6; }
|
||||
if test "x$ac_cv_cflags__fexcess_precision_standard" = xyes; then :
|
||||
EXCESS_PRECISION_CFLAGS="-fexcess-precision=standard"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wpointer-arith" >&5
|
||||
$as_echo_n "checking whether the compiler supports -Wpointer-arith... " >&6; }
|
||||
if ${ac_cv_cflags__Wpointer_arith+:} false; then :
|
||||
|
@ -20061,6 +20129,7 @@ OPENCL_LIBS = $OPENCL_LIBS
|
|||
QUICKTIME_LIBS = $QUICKTIME_LIBS
|
||||
CARBON_LIBS = $CARBON_LIBS
|
||||
METAL_LIBS = $METAL_LIBS
|
||||
EXCESS_PRECISION_CFLAGS = $EXCESS_PRECISION_CFLAGS
|
||||
PTHREAD_LIBS = $PTHREAD_LIBS
|
||||
X_CFLAGS = $X_CFLAGS
|
||||
X_PRE_LIBS = $X_PRE_LIBS
|
||||
|
@ -20132,7 +20201,6 @@ NETAPI_CFLAGS = $NETAPI_CFLAGS
|
|||
NETAPI_LIBS = $NETAPI_LIBS
|
||||
VKD3D_CFLAGS = $VKD3D_CFLAGS
|
||||
VKD3D_LIBS = $VKD3D_LIBS
|
||||
EXCESS_PRECISION_CFLAGS = $EXCESS_PRECISION_CFLAGS
|
||||
POLL_LIBS = $POLL_LIBS
|
||||
RT_LIBS = $RT_LIBS
|
||||
LDAP_CFLAGS = $LDAP_CFLAGS
|
||||
|
|
|
@ -1078,6 +1078,7 @@ then
|
|||
WINE_TRY_CROSSCFLAGS([-fno-strict-aliasing])
|
||||
dnl clang needs to be told to fail on unknown options
|
||||
WINE_TRY_CROSSCFLAGS([-Werror=unknown-warning-option],[CFLAGS="$CFLAGS -Werror=unknown-warning-option"])
|
||||
WINE_TRY_CROSSCFLAGS([-Werror=ignored-optimization-argument],[CFLAGS="$CFLAGS -Werror=ignored-optimization-argument"])
|
||||
WINE_TRY_CROSSCFLAGS([-Wdeclaration-after-statement])
|
||||
WINE_TRY_CROSSCFLAGS([-Wempty-body])
|
||||
WINE_TRY_CROSSCFLAGS([-Wignored-qualifiers])
|
||||
|
@ -1119,6 +1120,8 @@ then
|
|||
pdb) WINE_TRY_CROSSCFLAGS([-gcodeview]) ;;
|
||||
esac
|
||||
|
||||
WINE_TRY_CROSSCFLAGS([-fexcess-precision=standard],[AC_SUBST(EXCESS_PRECISION_CFLAGS,"-fexcess-precision=standard")])
|
||||
|
||||
if test "x$enable_werror" = "xyes"
|
||||
then
|
||||
WINE_TRY_CROSSCFLAGS([-Werror])
|
||||
|
@ -2049,7 +2052,6 @@ then
|
|||
WINE_TRY_CFLAGS([-fcf-protection=none])
|
||||
WINE_TRY_CFLAGS([-fno-stack-protector])
|
||||
WINE_TRY_CFLAGS([-fno-strict-aliasing])
|
||||
WINE_TRY_CFLAGS([-fexcess-precision=standard],[AC_SUBST(EXCESS_PRECISION_CFLAGS,"-fexcess-precision=standard")])
|
||||
WINE_TRY_CFLAGS([-Wdeclaration-after-statement])
|
||||
WINE_TRY_CFLAGS([-Wempty-body])
|
||||
WINE_TRY_CFLAGS([-Wignored-qualifiers])
|
||||
|
@ -2062,6 +2064,11 @@ then
|
|||
WINE_TRY_CFLAGS([-Wvla])
|
||||
WINE_TRY_CFLAGS([-Wwrite-strings])
|
||||
|
||||
if test -z "$CROSSTARGET"
|
||||
then
|
||||
WINE_TRY_CFLAGS([-fexcess-precision=standard],[AC_SUBST(EXCESS_PRECISION_CFLAGS,"-fexcess-precision=standard")])
|
||||
fi
|
||||
|
||||
dnl Check for noisy string.h
|
||||
WINE_TRY_CFLAGS([-Wpointer-arith],
|
||||
[saved_string_h_CFLAGS=$CFLAGS
|
||||
|
|
Loading…
Reference in New Issue