configure: Build with -mcx16 on x86_64.

This is needed on clang msvc target to allow _InterlockedCompareExchange128.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-31 15:37:17 +02:00 committed by Alexandre Julliard
parent eedbfe0c0d
commit dc199ae8b8
2 changed files with 33 additions and 1 deletions

31
configure vendored
View File

@ -10582,6 +10582,37 @@ fi
$as_echo "$ac_cv_crosscflags__Wnonnull" >&6; }
if test "x$ac_cv_crosscflags__Wnonnull" = xyes; then :
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wnonnull"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -mcx16" >&5
$as_echo_n "checking whether the cross-compiler supports -mcx16... " >&6; }
if ${ac_cv_crosscflags__mcx16+:} 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 -mcx16"
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__mcx16=yes
else
ac_cv_crosscflags__mcx16=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__mcx16" >&5
$as_echo "$ac_cv_crosscflags__mcx16" >&6; }
if test "x$ac_cv_crosscflags__mcx16" = xyes; then :
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -mcx16"
fi ;;
esac

View File

@ -1096,7 +1096,8 @@ then
*i[[3456789]]86*) WINE_TRY_CROSSCFLAGS([-fno-omit-frame-pointer]) ;;
x86_64) WINE_TRY_CROSSCFLAGS([-Wno-format])
WINE_TRY_CROSSCFLAGS([-Wformat-overflow])
WINE_TRY_CROSSCFLAGS([-Wnonnull]) ;;
WINE_TRY_CROSSCFLAGS([-Wnonnull])
WINE_TRY_CROSSCFLAGS([-mcx16]) ;;
esac
dnl Determine debug info format