[Buildroot] [PATCH/next v5 2/6] package/ffmpeg: default to --cpu=generic for MIPS architecture

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Aug 26 19:46:28 UTC 2016


Hello,

On Mon, 15 Aug 2016 17:03:37 +0200, Bernd Kuhls wrote:

> diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
> index a816cea..154a091 100644
> --- a/package/ffmpeg/ffmpeg.mk
> +++ b/package/ffmpeg/ffmpeg.mk
> @@ -455,6 +455,11 @@ else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
>  FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH)
>  endif
>  
> +# Default to --cpu=generic for MIPS architecture
> +ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
> +FFMPEG_CONF_OPTS += --cpu=generic
> +endif

The conditionals above were already adding a --cpu option. Even though
the last option probably wins, it isn't that nice, so I've changed the
code to:

# 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

However, the configure script makes it pretty clear that not all
BR2_GCC_TARGET_{CPU,ARCH} values might be valid, so maybe this is
something we should revisit at some point.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the buildroot mailing list