Charles Davis : configure: Check for __builtin_ms_va_list on all x86_64 platforms.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 12 06:45:24 CDT 2016


Module: wine
Branch: stable
Commit: cf0b579412728d93d35301cd6e664dc5d9158e1f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cf0b579412728d93d35301cd6e664dc5d9158e1f

Author: Charles Davis <cdavis5x at gmail.com>
Date:   Mon Feb 29 01:43:17 2016 -0700

configure: Check for __builtin_ms_va_list on all x86_64 platforms.

Signed-off-by: Charles Davis <cdavis5x at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 7d295d381c003eb2e43e781b818e5eaeb8a27f3c)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 configure    | 33 +++++++++++----------------------
 configure.ac | 31 +++++++++++--------------------
 2 files changed, 22 insertions(+), 42 deletions(-)

diff --git a/configure b/configure
index a31a3bd..584c2fe 100755
--- a/configure
+++ b/configure
@@ -4936,25 +4936,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
@@ -5011,11 +5001,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
@@ -5048,10 +5041,6 @@ rm -f core conftest.err conftest.$ac_objext \
     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 37ceab5..88e6b32 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 <stdarg.h>]], [[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}
     ;;




More information about the wine-cvs mailing list