ffmpeg: make ARM optimizations explicit
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Fri, 21 Dec 2012 02:40:31 +0000 (02:40 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 21 Dec 2012 12:54:42 +0000 (13:54 +0100)
The ffmpeg configure script tries to autodetermine ARM optimizations by
building a small code snippet with AS.
If AS allows higher-level (>generic) assembly instructions then it
passes and enables the relevant optimization path.
Some toolchains allow/default to more than generic asm and then fail
when the real code is built.
Fixes:
http://autobuild.buildroot.net/results/b6e1225a07a58cc7544e37bc55675be71e2b5088/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/multimedia/ffmpeg/ffmpeg.mk

index 90c1f1b4095e5c5e069343221412893aaa4bf86f..b018ea077ea5ffa4f499d5daccf5e09112849392 100644 (file)
@@ -133,19 +133,26 @@ FFMPEG_DEPENDENCIES += host-nasm
 endif
 endif
 
-# ARM defaults to v5: clear if less, add extra if more
+# Explicitly disable everything that doesn't match for ARM
+# FFMPEG "autodetects" by compiling an extended instruction via AS
+# This works on compilers that aren't built for generic by default
 ifeq ($(BR2_generic_arm)$(BR2_arm7tdmi)$(BR2_arm610)$(BR2_arm710)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t),y)
 FFMPEG_CONF_OPT += --disable-armv5te
 endif
 ifeq ($(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf-s),y)
 FFMPEG_CONF_OPT += --enable-armv6
+else
+FFMPEG_CONF_OPT += --disable-armv6 --disable-armv6t2
 endif
-ifeq ($(BR2_arm10)$(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf-s)$(BR2_cortex_a8)$(BR2_cortex_a9),y)
+ifeq ($(BR2_arm10)$(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf-s)$(BR2_cortex_a5)$(BR2_cortex_a8)$(BR2_cortex_a9)$(BR2_cortex_a15),y)
 FFMPEG_CONF_OPT += --enable-armvfp
+else
+FFMPEG_CONF_OPT += --disable-armvfp
 endif
 ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
 FFMPEG_CONF_OPT += --enable-neon
 endif
+
 # Set powerpc altivec appropriately
 ifeq ($(BR2_powerpc),y)
 ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)