From 7d295d381c003eb2e43e781b818e5eaeb8a27f3c Mon Sep 17 00:00:00 2001 From: Charles Davis Date: Mon, 29 Feb 2016 01:43:17 -0700 Subject: [PATCH] configure: Check for __builtin_ms_va_list on all x86_64 platforms. Signed-off-by: Charles Davis Signed-off-by: Alexandre Julliard --- configure | 33 +++++++++++---------------------- configure.ac | 31 +++++++++++-------------------- 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/configure b/configure index be1e2f19270..7bf9178302a 100755 --- a/configure +++ b/configure @@ -4965,25 +4965,15 @@ fi case $host in *-darwin*) - if test "x$enable_win64" = "xyes" - then - CC="$CC -m64" - CXX="$CXX -m64" - host_cpu="x86_64" - notice_platform="64-bit " - TARGETFLAGS="-m64" - - else - CC="$CC -m32" - CXX="$CXX -m32" - host_cpu="i386" - notice_platform="32-bit " - TARGETFLAGS="-m32" - - enable_win16=${enable_win16:-yes} - fi with_fontconfig=${with_fontconfig:-no} ;; + *-mingw32*|*-cygwin*) + enable_win16=${enable_win16:-no} + CFLAGS="$CFLAGS -D_WIN32" + ;; +esac + +case $host in x86_64*|amd64*) if test "x$enable_win64" != "xyes" -a "$cross_compiling" != "yes" then @@ -5040,11 +5030,14 @@ $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "You need gcc >= 4.4 to build Wine as 64-bit." "$LINENO" 5 + as_fn_error $? "You need gcc >= 4.4 or clang >= 3.8 to build Wine as 64-bit." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + CC="$CC -m64" + CXX="$CXX -m64" host_cpu="x86_64" + notice_platform="64-bit " TARGETFLAGS="-m64" fi @@ -5076,10 +5069,6 @@ rm -f core conftest.err conftest.$ac_objext \ CFLAGS="$CFLAGS -marm" TARGETFLAGS="-marm" - ;; - *-mingw32*|*-cygwin*) - enable_win16=${enable_win16:-no} - CFLAGS="$CFLAGS -D_WIN32" ;; i[3456789]86*) enable_win16=${enable_win16:-yes} diff --git a/configure.ac b/configure.ac index e20cbe7fa46..19abd084ddf 100644 --- a/configure.ac +++ b/configure.ac @@ -127,23 +127,15 @@ AC_CHECK_TOOL(LD,ld) case $host in *-darwin*) - if test "x$enable_win64" = "xyes" - then - CC="$CC -m64" - CXX="$CXX -m64" - host_cpu="x86_64" - notice_platform="64-bit " - AC_SUBST(TARGETFLAGS,"-m64") - else - CC="$CC -m32" - CXX="$CXX -m32" - host_cpu="i386" - notice_platform="32-bit " - AC_SUBST(TARGETFLAGS,"-m32") - enable_win16=${enable_win16:-yes} - fi with_fontconfig=${with_fontconfig:-no} ;; + *-mingw32*|*-cygwin*) + enable_win16=${enable_win16:-no} + CFLAGS="$CFLAGS -D_WIN32" + ;; +esac + +case $host in x86_64*|amd64*) if test "x$enable_win64" != "xyes" -a "$cross_compiling" != "yes" then @@ -164,9 +156,12 @@ case $host in AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[void func(__builtin_ms_va_list *args);]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) - AC_MSG_ERROR([You need gcc >= 4.4 to build Wine as 64-bit.])]) + AC_MSG_ERROR([You need gcc >= 4.4 or clang >= 3.8 to build Wine as 64-bit.])]) fi + CC="$CC -m64" + CXX="$CXX -m64" host_cpu="x86_64" + notice_platform="64-bit " AC_SUBST(TARGETFLAGS,"-m64") fi ;; @@ -179,10 +174,6 @@ case $host in CFLAGS="$CFLAGS -marm" AC_SUBST(TARGETFLAGS,"-marm") ;; - *-mingw32*|*-cygwin*) - enable_win16=${enable_win16:-no} - CFLAGS="$CFLAGS -D_WIN32" - ;; i[[3456789]]86*) enable_win16=${enable_win16:-yes} ;;