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 <[email protected]> >From 212753d3dc2c31456019345a1718e273f6677dd5 Mon Sep 17 00:00:00 2001 From: Jun Zhao <[email protected]> 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 <[email protected]> --- 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 -- [email protected] To unsubscribe send an email to [email protected]
