[x264-devel] commit: ARM configure: enable NEON-related options by default ( David Conrad )

git version control git at videolan.org
Tue Aug 25 05:54:55 CEST 2009


x264 | branch: master | David Conrad <lessen42 at gmail.com> | Mon Aug 24 17:17:41 2009 -0700| [c8edc12043086b8f52a3b6b2176b70e0d48ff271] | committer: Jason Garrett-Glaser 

ARM configure: enable NEON-related options by default
When compiling for ARM, x264 will compile by default for Cortex A8 unless specified otherwise.
To compile for pre-ARMv6, --disable-asm is required.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=c8edc12043086b8f52a3b6b2176b70e0d48ff271
---

 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index a4af82a..ac07a01 100755
--- a/configure
+++ b/configure
@@ -326,12 +326,17 @@ if [ $asm = yes -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
 fi
 
 if [ $asm = yes -a $ARCH = ARM ] ; then
+    # set flags so neon is built by default
+    echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-mfloat-abi)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
+
     if  cc_check '' '' 'asm("rev r0, r0");' ; then      CFLAGS="$CFLAGS -DHAVE_ARMV6"
         cc_check '' '' 'asm("movt r0, #0");'         && CFLAGS="$CFLAGS -DHAVE_ARMV6T2"
         cc_check '' '' 'asm("vadd.i16 q0, q0, q0");' && CFLAGS="$CFLAGS -DHAVE_NEON"
         ASFLAGS="$ASFLAGS $CFLAGS -c"
     else
-        asm="no"
+        echo "You specified a pre-ARMv6 CPU in your CFLAGS."
+        echo "If you really want to run on such a CPU, configure with --disable-asm."
+        exit 1
     fi
 fi
 



More information about the x264-devel mailing list