1
diff --git a/configure.ac b/configure.ac
2
index 304a1df..eda315f 100644
5
@@ -357,18 +357,28 @@ AM_CONDITIONAL(USE_VMX, test $have_vmx_intrinsics = yes)
7
dnl ===========================================================================
8
dnl Check for ARM SIMD instructions
9
-ARM_SIMD_CFLAGS="-mcpu=arm1136j-s"
13
AC_MSG_CHECKING(whether to use ARM SIMD assembler)
14
-xserver_save_CFLAGS=$CFLAGS
15
-CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS"
16
+# check with default CFLAGS in case the toolchain turns on a sufficiently recent -mcpu=
19
asm("uqadd8 r1, r1, r2");
21
-}], have_arm_simd=yes)
22
-CFLAGS=$xserver_save_CFLAGS
23
+}], have_arm_simd=yes,
24
+ # check again with an explicit -mcpu= in case the toolchain defaults to an
25
+ # older one; note that uqadd8 isn't available in Thumb mode on arm1136j-s
26
+ # so we force ARM mode
27
+ ARM_SIMD_CFLAGS="-mcpu=arm1136j-s -marm"
28
+ xserver_save_CFLAGS=$CFLAGS
29
+ CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS"
32
+ asm("uqadd8 r1, r1, r2");
34
+ }], have_arm_simd=yes)
35
+ CFLAGS=$xserver_save_CFLAGS)
37
AC_ARG_ENABLE(arm-simd,
38
[AC_HELP_STRING([--disable-arm-simd],