configure: Cache result of the cross-compiler check.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-14 14:48:39 +02:00
parent 09e1c0f6ca
commit 2b5dc2ebd5
2 changed files with 37 additions and 29 deletions

19
configure vendored
View File

@ -9679,6 +9679,9 @@ test -n "$CROSSCC" || CROSSCC="false"
CFLAGS=$CROSSCFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CROSSCC works" >&5
$as_echo_n "checking whether $CROSSCC works... " >&6; }
if ${wine_cv_crosscc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -9691,8 +9694,16 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
wine_cv_crosscc=yes
else
wine_cv_crosscc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_crosscc" >&5
$as_echo "$wine_cv_crosscc" >&6; }
if test $wine_cv_crosscc = yes
then
set x $CROSSCC
shift
while test $# -ge 1
@ -9703,11 +9714,7 @@ $as_echo "yes" >&6; }
esac
shift
done
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -fno-strict-aliasing" >&5
$as_echo_n "checking whether the cross-compiler supports -fno-strict-aliasing... " >&6; }
if ${ac_cv_crosscflags__fno_strict_aliasing+:} false; then :

View File

@ -1007,9 +1007,10 @@ then
CC="$CROSSCC"
CFLAGS=$CROSSCFLAGS
AC_MSG_CHECKING([whether $CROSSCC works])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])
AC_CACHE_CHECK([whether $CROSSCC works], wine_cv_crosscc,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],[wine_cv_crosscc=yes],[wine_cv_crosscc=no])])
if test $wine_cv_crosscc = yes
then
set x $CROSSCC
shift
while test $# -ge 1
@ -1019,8 +1020,8 @@ then
*-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;;
esac
shift
done],
[AC_MSG_RESULT([no])])
done
fi
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"])