package/ffmpeg: default to --cpu=generic for MIPS architecture
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>
Mon, 15 Aug 2016 15:03:37 +0000 (17:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 26 Aug 2016 15:16:19 +0000 (17:16 +0200)
This option is needed to prevent this message from configure:

WARNING: unknown CPU. Disabling all MIPS optimizations.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Thomas:
 - group with the other --cpu conditions so that only one is passed.
 - improve the comment.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ffmpeg/ffmpeg.mk

index a816ceac29ffbe62849a0feaf6034eb55bf1ebc3..91e7fa979a3108aa333a5ff782bf5197d2be1d85 100644 (file)
@@ -449,12 +449,17 @@ else
 FFMPEG_CONF_OPTS += --disable-pic
 endif
 
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
+# Default to --cpu=generic for MIPS architecture, in order to avoid a
+# warning from ffmpeg's configure script.
+ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
+FFMPEG_CONF_OPTS += --cpu=generic
+else ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
 FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_CPU)
 else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
 FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH)
 endif
 
+
 FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF))
 
 # Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others