diff options
author | Loïc Minier <loic.minier@ubuntu.com> | 2010-03-09 20:57:34 +0100 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2010-03-14 13:15:34 +0200 |
commit | 18f0de452dc7e12e4cb544d761a626d5c6031663 (patch) | |
tree | 64583af3b82158f1a3977bc1852304b1e81172c6 | |
parent | 933540861383da27402680593edefe8d61e6fb02 (diff) |
ARM: SIMD: Try without any CFLAGS before forcing -mcpu=
http://bugs.launchpad.net/bugs/535183
-rw-r--r-- | configure.ac | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index dcfbfa9..fed97b1 100644 --- a/configure.ac +++ b/configure.ac @@ -363,18 +363,28 @@ AM_CONDITIONAL(USE_VMX, test $have_vmx_intrinsics = yes) dnl =========================================================================== dnl Check for ARM SIMD instructions -ARM_SIMD_CFLAGS="-mcpu=arm1136j-s" +ARM_SIMD_CFLAGS="" have_arm_simd=no AC_MSG_CHECKING(whether to use ARM SIMD assembler) -xserver_save_CFLAGS=$CFLAGS -CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS" +# check with default CFLAGS in case the toolchain turns on a sufficiently recent -mcpu= AC_COMPILE_IFELSE([ int main () { asm("uqadd8 r1, r1, r2"); return 0; -}], have_arm_simd=yes) -CFLAGS=$xserver_save_CFLAGS +}], have_arm_simd=yes, + # check again with an explicit -mcpu= in case the toolchain defaults to an + # older one; note that uqadd8 isn't available in Thumb mode on arm1136j-s + # so we force ARM mode + ARM_SIMD_CFLAGS="-mcpu=arm1136j-s -marm" + xserver_save_CFLAGS=$CFLAGS + CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS" + AC_COMPILE_IFELSE([ + int main () { + asm("uqadd8 r1, r1, r2"); + return 0; + }], have_arm_simd=yes) + CFLAGS=$xserver_save_CFLAGS) AC_ARG_ENABLE(arm-simd, [AC_HELP_STRING([--disable-arm-simd], |