diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 31a3cb9a24..9eb2aa80f8 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ffmpeg PKG_VERSION:=9.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://ffmpeg.org/releases/ @@ -465,6 +465,14 @@ ifeq ($(ARCH),x86_64) FFMPEG_CONFIGURE+= --enable-lto endif +# e500 cores (8540, 8548) trap on dcbzl and on the 4xx maclhw/mullhw. +# configure does not disable them for these --cpu names, so do it here. +ifneq ($(filter 8540 8548,$(REAL_CPU_TYPE)),) + FFMPEG_CONFIGURE+= \ + --disable-dcbzl \ + --disable-ppc4xx +endif + ifeq ($(CONFIG_FFMPEG_X86ASM),y) FFMPEG_CONFIGURE += --enable-x86asm else diff --git a/multimedia/ffmpeg/patches/200-configure-honour-disabled-dcbzl.patch b/multimedia/ffmpeg/patches/200-configure-honour-disabled-dcbzl.patch new file mode 100644 index 0000000000..1310a26abe --- /dev/null +++ b/multimedia/ffmpeg/patches/200-configure-honour-disabled-dcbzl.patch @@ -0,0 +1,30 @@ +From 65b8a2bad912c39e8fd63b772dc952e8bbd40f1b Mon Sep 17 00:00:00 2001 +From: Josef Schlehofer +Date: Mon, 28 Sep 2026 07:56:27 +0200 +Subject: [PATCH] configure: do not probe dcbzl when it is disabled + +The dcbzl probe runs unconditionally and re-enables dcbzl whenever the +assembler accepts it, overriding --disable-dcbzl and the "disable dcbzl" +in the e500 and e500v2 --cpu cases. e500 cores trap on dcbzl, so ffmpeg +dies with SIGILL in ff_blockdsp_init_ppc() on a P2020 (e500v2) as soon +as it opens an MPEG-2 decoder. + +Only run the probe when dcbzl is not disabled. + +Fixes: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/24747 +Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24748 +Suggested-by: Michael Niedermayer +Original-patch-by: Peter Krefting +Signed-off-by: Josef Schlehofer +--- +--- a/configure ++++ b/configure +@@ -6802,7 +6802,7 @@ elif enabled parisc; then + + elif enabled ppc; then + +- check_inline_asm dcbzl '"dcbzl 0, %0" :: "r"(0)' ++ disabled dcbzl || check_inline_asm dcbzl '"dcbzl 0, %0" :: "r"(0)' + check_inline_asm ibm_asm '"add 0, 0, 0"' + check_inline_asm ppc4xx '"maclhw r10, r11, r12"' + check_inline_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' diff --git a/multimedia/ffmpeg/patches/201-configure-honour-disabled-ppc4xx.patch b/multimedia/ffmpeg/patches/201-configure-honour-disabled-ppc4xx.patch new file mode 100644 index 0000000000..970aea5b9f --- /dev/null +++ b/multimedia/ffmpeg/patches/201-configure-honour-disabled-ppc4xx.patch @@ -0,0 +1,24 @@ +From 647c9ec875f1b6ed263ac90bc2bbc8ffa0118d72 Mon Sep 17 00:00:00 2001 +From: Josef Schlehofer +Date: Mon, 28 Sep 2026 10:58:43 +0200 +Subject: [PATCH] configure: do not probe ppc4xx when it is disabled + +The ppc4xx probe re-enables ppc4xx whenever the assembler accepts +maclhw, overriding --disable-ppc4xx. Only run the probe when ppc4xx +is not disabled. + +Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/22698 +Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24750 +Signed-off-by: Josef Schlehofer +--- +--- a/configure ++++ b/configure +@@ -6804,7 +6804,7 @@ elif enabled ppc; then + + disabled dcbzl || check_inline_asm dcbzl '"dcbzl 0, %0" :: "r"(0)' + check_inline_asm ibm_asm '"add 0, 0, 0"' +- check_inline_asm ppc4xx '"maclhw r10, r11, r12"' ++ disabled ppc4xx || check_inline_asm ppc4xx '"maclhw r10, r11, r12"' + check_inline_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)' + + if enabled altivec; then