* [FFmpeg-devel] [PATCH] configure: Fix ARM architecture feature detection for ARMv6 (PR #21256)
@ 2025-12-21 23:39 Jun Zhao via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Jun Zhao via ffmpeg-devel @ 2025-12-21 23:39 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Jun Zhao
PR #21256 opened by Jun Zhao (mypopydev)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21256
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21256.patch
When configuring for ARMv6 targets (e.g., Raspberry Pi 1 with
ARM1176JZF-S), the configure script incorrectly enabled ARMv6T2
and NEON features that are not supported by plain ARMv6 cores.
All ARM architecture extensions are enabled by default, and the
subarch-based case statement only enabled optimization flags
without explicitly disabling incompatible features.
This fix adds explicit feature disabling based on the detected ARM
subarchitecture:
- ARMv5TE: Disable all ARMv6+ features
- ARMv6 variants: Disable ARMv6T2, NEON, and VFPv3
- ARMv6T2: Disable NEON and VFPv3
- ARMv7/8: Let compiler tests determine feature support
Without this fix, compiled binaries would contain unsupported
instructions and crash with SIGILL on ARMv6 devices.
Fixes trac ticket #11695
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
>From 212753d3dc2c31456019345a1718e273f6677dd5 Mon Sep 17 00:00:00 2001
From: Jun Zhao <barryjzhao@tencent.com>
Date: Sun, 21 Dec 2025 20:28:26 +0800
Subject: [PATCH] configure: Fix ARM architecture feature detection for ARMv6
When configuring for ARMv6 targets (e.g., Raspberry Pi 1 with
ARM1176JZF-S), the configure script incorrectly enabled ARMv6T2
and NEON features that are not supported by plain ARMv6 cores.
All ARM architecture extensions are enabled by default, and the
subarch-based case statement only enabled optimization flags
without explicitly disabling incompatible features.
This fix adds explicit feature disabling based on the detected ARM
subarchitecture:
- ARMv5TE: Disable all ARMv6+ features
- ARMv6 variants: Disable ARMv6T2, NEON, and VFPv3
- ARMv6T2: Disable NEON and VFPv3
- ARMv7/8: Let compiler tests determine feature support
Without this fix, compiled binaries would contain unsupported
instructions and crash with SIGILL on ARMv6 devices.
Fixes trac ticket #11695
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
configure | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 4791a67562..0f07757f83 100755
--- a/configure
+++ b/configure
@@ -5570,10 +5570,33 @@ elif enabled arm; then
esac
case "$subarch" in
- armv5t*) enable fast_clz ;;
- armv[6-8]*)
+ armv5t*)
+ enable fast_clz
+ # ARMv5TE doesn't support ARMv6+ features
+ disable armv6 armv6t2 neon vfp vfpv3
+ ;;
+ armv6)
enable fast_clz
disabled fast_unaligned || enable fast_unaligned
+ # Plain ARMv6 doesn't support ARMv6T2 or NEON
+ disable armv6t2 neon vfpv3
+ ;;
+ armv6j|armv6k|armv6z|armv6zk)
+ enable fast_clz
+ disabled fast_unaligned || enable fast_unaligned
+ # These ARMv6 variants don't support ARMv6T2 or NEON
+ disable armv6t2 neon vfpv3
+ ;;
+ armv6t2*)
+ enable fast_clz
+ disabled fast_unaligned || enable fast_unaligned
+ # ARMv6T2 doesn't support NEON
+ disable neon vfpv3
+ ;;
+ armv[7-8]*)
+ enable fast_clz
+ disabled fast_unaligned || enable fast_unaligned
+ # ARMv7/ARMv8 features are checked later via compiler tests
;;
esac
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-21 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-21 23:39 [FFmpeg-devel] [PATCH] configure: Fix ARM architecture feature detection for ARMv6 (PR #21256) Jun Zhao via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git