=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: configure: Check for Thumb2 on ARM and compile always in ARM mode.

Alexandre Julliard julliard at winehq.org
Mon Apr 30 14:13:08 CDT 2012


Module: wine
Branch: master
Commit: 33ca051472db9f6730afedef532901fd29c68be7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=33ca051472db9f6730afedef532901fd29c68be7

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Apr 29 21:43:43 2012 +0200

configure: Check for Thumb2 on ARM and compile always in ARM mode.

---

 configure    |   26 ++++++++++++++++++++++++++
 configure.ac |    8 ++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 46827c1..5b8c648 100755
--- a/configure
+++ b/configure
@@ -4124,6 +4124,32 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     fi
     ;;
+  arm*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports Thumb2" >&5
+$as_echo_n "checking whether $CC supports Thumb2... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int ac_test(int i) { return i; }
+int
+main ()
+{
+asm(".syntax unified\n.thumb\nb.w ac_test\n.arm"); if (ac_test(1)) return 1
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       as_fn_error $? "You need a target with Thumb2 support to build Wine for ARM." "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    CFLAGS="$CFLAGS -marm"
+    ;;
   *-mingw32*|*-cygwin*)
     enable_win16=${enable_win16:-no}
     CFLAGS="$CFLAGS -D_WIN32"
diff --git a/configure.ac b/configure.ac
index efc03af..18da8c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,6 +168,14 @@ case $host in
       AC_SUBST(TARGETFLAGS,"-m64")
     fi
     ;;
+  arm*)
+    AC_MSG_CHECKING([whether $CC supports Thumb2])
+    WINE_TRY_ASM_LINK([".syntax unified\n.thumb\nb.w ac_test\n.arm"],[int ac_test(int i) { return i; }], [if (ac_test(1)) return 1],
+                      [AC_MSG_RESULT([yes])],
+                      [AC_MSG_RESULT([no])
+                       AC_MSG_ERROR([You need a target with Thumb2 support to build Wine for ARM.])])
+    CFLAGS="$CFLAGS -marm"
+    ;;
   *-mingw32*|*-cygwin*)
     enable_win16=${enable_win16:-no}
     CFLAGS="$CFLAGS -D_WIN32"




More information about the wine-cvs mailing list