From 251640ac95f7b09844bd002b0c98980dfbe6ef83 Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Wed, 15 Aug 2018 08:58:40 -0400 Subject: [PATCH] ffmpeg: Add build overrides for some specific CPUs: Octeon, X86 and 24kf. Octeon: Rename octeonplus to oction+ MIPS 24kf: Inline ASM fails to build (unknown reason) X86: Configure finds NASM and assumes YASM if name explictly set (wrong switches) Signed-off-by: Ted Hess --- multimedia/ffmpeg/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index e6ddbc92a5..bbf22b7b07 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -374,6 +374,8 @@ endef # Strip off FPU notation REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE))) +# Fixup cpu types recogized by ffmpeg configure +REAL_CPU_TYPE:=$(subst octeonplus,octeon+,$(REAL_CPU_TYPE)) FFMPEG_CONFIGURE:= \ CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \ @@ -422,6 +424,10 @@ FFMPEG_CONFIGURE+= \ else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),) FFMPEG_CONFIGURE+= \ --disable-altivec +# libavcode/mips/aacdec_mips.c build problem +else ifneq ($(findstring 24kf,$(CONFIG_CPU_TYPE)),) +FFMPEG_CONFIGURE+= \ + --disable-inline-asm endif # selectively disable optimizations according to arch/cpu type @@ -446,9 +452,14 @@ ifeq ($(ARCH),x86_64) FFMPEG_CONFIGURE+= --enable-lto endif -ifneq ($(CONFIG_YASM),y) -FFMPEG_CONFIGURE+= --disable-yasm - +ifneq ($(CONFIG_TARGET_x86),) +ifeq ($(CONFIG_NASM),y) + # Set yasmexe to anything but YASM/NASM (ffmpeg configure will then find NASM correctly) + # Newer ffmpeg packages will use --enable-x86asm (with NASM default) + FFMPEG_CONFIGURE += --yasmexe=xyzzy +else + FFMPEG_CONFIGURE += --disable-yasm +endif endif ifeq ($(BUILD_VARIANT),full) -- 2.30.2