Commit 2b5dc2eb authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Cache result of the cross-compiler check.

parent 09e1c0f6
...@@ -9679,7 +9679,10 @@ test -n "$CROSSCC" || CROSSCC="false" ...@@ -9679,7 +9679,10 @@ test -n "$CROSSCC" || CROSSCC="false"
CFLAGS=$CROSSCFLAGS CFLAGS=$CROSSCFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CROSSCC works" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CROSSCC works" >&5
$as_echo_n "checking whether $CROSSCC works... " >&6; } $as_echo_n "checking whether $CROSSCC works... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext if ${wine_cv_crosscc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
int int
...@@ -9691,23 +9694,27 @@ main () ...@@ -9691,23 +9694,27 @@ main ()
} }
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 wine_cv_crosscc=yes
$as_echo "yes" >&6; }
set x $CROSSCC
shift
while test $# -ge 1
do
case "$1" in
*-gcc) CROSSTARGET=`expr "$1" : '\(.*\)-gcc'` ;;
*-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;;
esac
shift
done
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 wine_cv_crosscc=no
$as_echo "no" >&6; }
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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
do
case "$1" in
*-gcc) CROSSTARGET=`expr "$1" : '\(.*\)-gcc'` ;;
*-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;;
esac
shift
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -fno-strict-aliasing" >&5 { $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; } $as_echo_n "checking whether the cross-compiler supports -fno-strict-aliasing... " >&6; }
if ${ac_cv_crosscflags__fno_strict_aliasing+:} false; then : if ${ac_cv_crosscflags__fno_strict_aliasing+:} false; then :
......
...@@ -1007,20 +1007,21 @@ then ...@@ -1007,20 +1007,21 @@ then
CC="$CROSSCC" CC="$CROSSCC"
CFLAGS=$CROSSCFLAGS CFLAGS=$CROSSCFLAGS
AC_MSG_CHECKING([whether $CROSSCC works]) AC_CACHE_CHECK([whether $CROSSCC works], wine_cv_crosscc,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],[wine_cv_crosscc=yes],[wine_cv_crosscc=no])])
[AC_MSG_RESULT([yes]) if test $wine_cv_crosscc = yes
set x $CROSSCC then
shift set x $CROSSCC
while test $# -ge 1 shift
do while test $# -ge 1
case "$1" in do
*-gcc) CROSSTARGET=`expr "$1" : '\(.*\)-gcc'` ;; case "$1" in
*-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;; *-gcc) CROSSTARGET=`expr "$1" : '\(.*\)-gcc'` ;;
esac *-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;;
shift esac
done], shift
[AC_MSG_RESULT([no])]) done
fi
WINE_TRY_CROSSCFLAGS([-fno-strict-aliasing]) WINE_TRY_CROSSCFLAGS([-fno-strict-aliasing])
dnl clang needs to be told to fail on unknown options 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=unknown-warning-option],[CFLAGS="$CFLAGS -Werror=unknown-warning-option"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment