]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fixed poor checking for ARM NEON
authorSteve Underwood <steveu@coppice.org>
Fri, 17 Jan 2014 15:16:23 +0000 (23:16 +0800)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Jan 2014 21:10:27 +0000 (02:10 +0500)
libs/spandsp/m4/ax_check_arm_neon.m4

index 1e972686ef44d141599eacde0938c0a1077ef6fb..834b2e963fd45cf16351bbcdf7327491983668df 100644 (file)
@@ -20,8 +20,8 @@ ac_cv_symbol_arm_neon="no"
 case "${ax_cv_c_compiler_vendor}" in
 gnu)
     save_CFLAGS="${CFLAGS}"
-    CFLAGS="${CFLAGS} -mfpu=neon"
-    AC_COMPILE_IFELSE(
+    CFLAGS="${CFLAGS} -mfpu=neon -mfloat-abi=hard"
+    AC_RUN_IFELSE(
         [AC_LANG_PROGRAM(
             [
                 #include <inttypes.h>
@@ -33,7 +33,7 @@ gnu)
                 }
             ],
             [
-                int32x4_t z;
+                volatile int32x4_t z;
                 int16_t x[[8]];
                 int16_t y[[8]];
                 z = testfunc(x, y);
@@ -45,6 +45,9 @@ gnu)
          COMP_VENDOR_CXXFLAGS="-mfpu=neon $COMP_VENDOR_CXXFLAGS"
          ac_cv_symbol_arm_neon="yes"],
 
+        [AC_MSG_RESULT([no])],
+
+        dnl Assume "no" if cross-compiling
         [AC_MSG_RESULT([no])]
     )
     CFLAGS="${save_CFLAGS}"