mirror of
https://github.com/openwrt/packages.git
synced 2026-10-14 18:37:03 +04:00
ffmpeg: disable dcbzl and ppc4xx on e500 cores
e500 cores trap on dcbzl, maclhw and mullhw, but configure enables dcbzl for --cpu=8548, and ppc4xx too with CONFIG_USE_LTO, so ffmpeg dies with SIGILL (seen on a Turris 1.1). Pass --disable-dcbzl and --disable-ppc4xx for 8540 and 8548 and make configure honour them. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This commit is contained in:
1 parent
7866154589
commit
d4a141e3f7
3 files changed
+63
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 65b8a2bad912c39e8fd63b772dc952e8bbd40f1b Mon Sep 17 00:00:00 2001
|
||||
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
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 <michael@niedermayer.cc>
|
||||
Original-patch-by: Peter Krefting <peter@softwolves.pp.se>
|
||||
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
---
|
||||
--- 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)'
|
||||
@@ -0,0 +1,24 @@
|
||||
From 647c9ec875f1b6ed263ac90bc2bbc8ffa0118d72 Mon Sep 17 00:00:00 2001
|
||||
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
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 <pepe.schlehofer@gmail.com>
|
||||
---
|
||||
--- 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
|
||||
Reference in new issue
Block a user