Module: wine Branch: master Commit: dc199ae8b8b38ac088eb0bcd05e1b023e3f5cd8e URL: https://source.winehq.org/git/wine.git/?a=commit;h=dc199ae8b8b38ac088eb0bcd0...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Jul 31 15:37:17 2020 +0200
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
---
configure | 31 +++++++++++++++++++++++++++++++ configure.ac | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/configure b/configure index 8808ab6807..f4e188f38e 100755 --- a/configure +++ b/configure @@ -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
diff --git a/configure.ac b/configure.ac index 65a7c5d625..c0a44f3712 100644 --- a/configure.ac +++ b/configure.ac @@ -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