PR #24242 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24242
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24242.patch


From a0454e3b5514e924f69782092912a2e8cdac286a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:35:49 +0200
Subject: [PATCH 01/15] configure: remove unused helper functions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

None of these have any callers left.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 75 -------------------------------------------------------
 1 file changed, 75 deletions(-)

diff --git a/configure b/configure
index 594697b64b..ee5e9d0c90 100755
--- a/configure
+++ b/configure
@@ -651,12 +651,6 @@ add_suffix(){
     for v; do echo ${v}${suffix}; done
 }
 
-remove_suffix(){
-    suffix=$1
-    shift
-    for v; do echo ${v%$suffix}; done
-}
-
 set_all(){
     value=$1
     shift
@@ -683,29 +677,6 @@ set_sanitized(){
     eval $(sanitize_var_name "$var")='$*'
 }
 
-get_sanitized(){
-    eval echo \$$(sanitize_var_name "$1")
-}
-
-pushvar(){
-    for pvar in $*; do
-        eval level=\${${pvar}_level:=0}
-        eval ${pvar}_${level}="\$$pvar"
-        eval ${pvar}_level=$(($level+1))
-    done
-}
-
-popvar(){
-    for pvar in $*; do
-        eval level=\${${pvar}_level:-0}
-        test $level = 0 && continue
-        eval level=$(($level-1))
-        eval $pvar="\${${pvar}_${level}}"
-        eval ${pvar}_level=$level
-        eval unset ${pvar}_${level}
-    done
-}
-
 request(){
     for var in $*; do
         eval ${var}_requested=yes
@@ -1051,10 +1022,6 @@ cc_o(){
     eval printf '%s\\n' $CC_O
 }
 
-cxx_e(){
-    eval printf '%s\\n' $CXX_E
-}
-
 cxx_o(){
     eval printf '%s\\n' $CXX_O
 }
@@ -1177,14 +1144,6 @@ test_x86asm(){
     test_cmd $x86asmexe $X86ASMFLAGS -Werror "$@" $(x86asm_o $TMPO) $TMPASM
 }
 
-check_cmd(){
-    log check_cmd "$@"
-    cmd=$1
-    disabled $cmd && return
-    disable $cmd
-    test_cmd $@ && enable $cmd
-}
-
 check_as(){
     log check_as "$@"
     name=$1
@@ -1672,13 +1631,6 @@ check_pkg_config(){
         eval add_cflags \$${name}_cflags
 }
 
-check_pkg_config_cpp(){
-    log check_pkg_config_cpp "$@"
-    name="$1"
-    test_pkg_config_cpp "$@" &&
-        eval add_cflags \$${name}_cflags
-}
-
 check_pkg_config_cxx(){
     log check_pkg_config_cxx "$@"
     name="$1"
@@ -1762,12 +1714,6 @@ require(){
     check_lib $name "$@" || die "ERROR: $name_version not found"
 }
 
-require_cc(){
-    log require_cc "$@"
-    name="$1"
-    check_cc "$@" || die "ERROR: $name failed"
-}
-
 require_cxx(){
     log require_cxx "$@"
     name_version="$1"
@@ -1794,12 +1740,6 @@ require_pkg_config(){
     check_pkg_config "$@" || die "ERROR: $pkg_version not found using 
pkg-config$pkg_config_fail_message"
 }
 
-require_pkg_config_cpp(){
-    log require_pkg_config_cpp "$@"
-    pkg_version="$2"
-    check_pkg_config_cpp "$@" || die "ERROR: $pkg_version not found using 
pkg-config$pkg_config_fail_message"
-}
-
 require_pkg_config_cxx(){
     log require_pkg_config_cxx "$@"
     pkg_version="$2"
@@ -1830,13 +1770,6 @@ test_host_cpp(){
     test_cmd $host_cc $host_cppflags $host_cflags "$@" $(hostcc_e $TMPO) $TMPC
 }
 
-check_host_cppflags(){
-    log check_host_cppflags "$@"
-    test_host_cpp "$@" <<EOF && append host_cppflags "$@"
-#include <stdlib.h>
-EOF
-}
-
 check_host_cflags(){
     log check_host_cflags "$@"
     set -- $($host_cflags_filter "$@")
@@ -1879,14 +1812,6 @@ test_host_cpp_condition(){
 EOF
 }
 
-check_host_cpp_condition(){
-    log check_host_cpp_condition "$@"
-    name=$1
-    shift 1
-    disable $name
-    test_host_cpp_condition "$@" && enable $name
-}
-
 check_host_lib(){
     log check_host_lib "$@"
     headers="$1"
-- 
2.52.0


From 7fc33ec29da9d7a88a26a21b92836b5e92deea53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:35:59 +0200
Subject: [PATCH 02/15] configure: fix log name in check_pkg_config_header_only
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index ee5e9d0c90..a77af3a190 100755
--- a/configure
+++ b/configure
@@ -1639,7 +1639,7 @@ check_pkg_config_cxx(){
 }
 
 check_pkg_config_header_only(){
-    log check_pkg_config_cpp "$@"
+    log check_pkg_config_header_only "$@"
     name="$1"
     test_pkg_config_cpp "$@" &&
         eval add_cflags \$${name}_incflags
-- 
2.52.0


From f37d10e83382d79a14e59f5ee5e8dc7ed2e9a278 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:36:15 +0200
Subject: [PATCH 03/15] configure: remove blocks_extension check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Leftover from the VDA removal, the result is used by nothing.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/configure b/configure
index a77af3a190..927ebbccc0 100755
--- a/configure
+++ b/configure
@@ -2532,7 +2532,6 @@ TOOLCHAIN_FEATURES="
     as_func
     as_object_arch
     asm_mod_q
-    blocks_extension
     ebx_available
     gnu_as
     gnu_windres
@@ -7886,10 +7885,6 @@ check_disable_warning_headers(){
 check_disable_warning_headers -Wno-deprecated-declarations
 check_disable_warning_headers -Wno-unused-variable
 
-test_cc <<EOF && enable blocks_extension
-void (^block)(void);
-EOF
-
 # add some linker flags
 check_ldflags 
-Wl,-rpath-link=:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
 enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags 
-Wl,-rpath,$libdir
-- 
2.52.0


From 7c3102ae703ddef59bc2e9a5896404c43d5b35f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:36:31 +0200
Subject: [PATCH 04/15] configure: remove inline_asm_labels check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The result is used by nothing.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/configure b/configure
index 927ebbccc0..ba95778c71 100755
--- a/configure
+++ b/configure
@@ -2537,7 +2537,6 @@ TOOLCHAIN_FEATURES="
     gnu_windres
     ibm_asm
     inline_asm_direct_symbol_refs
-    inline_asm_labels
     inline_asm_nonlocal_labels
     pragma_deprecated
     rsync_contimeout
@@ -6517,8 +6516,6 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && 
enabled asm; then
                       .endfunc"
 fi
 
-check_inline_asm inline_asm_labels '"1:\n"'
-
 check_inline_asm inline_asm_nonlocal_labels '"Label:\n"'
 
 if enabled aarch64; then
-- 
2.52.0


From c564bfa012317b1de86d3f43a188b2c61f4cef13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:36:55 +0200
Subject: [PATCH 05/15] configure: remove rsync --contimeout availability check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The option exists since rsync 3.0 from 2008.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure      | 2 --
 tests/Makefile | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/configure b/configure
index ba95778c71..efeabe34d6 100755
--- a/configure
+++ b/configure
@@ -2539,7 +2539,6 @@ TOOLCHAIN_FEATURES="
     inline_asm_direct_symbol_refs
     inline_asm_nonlocal_labels
     pragma_deprecated
-    rsync_contimeout
     symver_asm_label
     symver_gnu_asm
     vfp_args
@@ -7524,7 +7523,6 @@ fi
 disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' 
&& enable texi2html || disable texi2html
 perl -v            > /dev/null 2>&1 && enable perl      || disable perl
 pod2man --help     > /dev/null 2>&1 && enable pod2man   || disable pod2man
-rsync --help 2> /dev/null | grep -q 'contimeout=' && enable rsync_contimeout 
|| disable rsync_contimeout
 xmllint --version  > /dev/null 2>&1 && enable xmllint   || disable xmllint
 
 check_headers linux/fb.h
diff --git a/tests/Makefile b/tests/Makefile
index 3f0132dd97..82c8cbb74d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -282,8 +282,7 @@ FATE_EXTERN                   += $(FATE_EXTERN-yes) 
$(FATE_SAMPLES_FASTSTART)
 
 FATE += $(FATE-yes)
 
-RSYNC_OPTIONS-$(HAVE_RSYNC_CONTIMEOUT) += --contimeout=60
-RSYNC_OPTIONS = -vrltLW --timeout=60 $(RSYNC_OPTIONS-yes)
+RSYNC_OPTIONS = -vrltLW --timeout=60 --contimeout=60
 
 $(FATE_FFMPEG) $(FATE_FFMPEG_FFPROBE) $(FATE_SAMPLES_AVCONV) 
$(FATE_SAMPLES_FFMPEG) $(FATE_SAMPLES_FFMPEG_FFPROBE): 
ffmpeg$(PROGSSUF)$(EXESUF)
 
-- 
2.52.0


From 91e156a79b5259b25ba8cb977fe1eb98d0535031 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:38:01 +0200
Subject: [PATCH 06/15] configure: remove gcc 2.x and 4.2 handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Neither can pass the C11 support check.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/configure b/configure
index efeabe34d6..e2c664d23f 100755
--- a/configure
+++ b/configure
@@ -5226,7 +5226,6 @@ suncc_flags(){
 probe_cc(){
     pfx=$1
     _cc=$2
-    first=$3
 
     unset _type _ident _cc_c _cc_e _cc_o _flags _cflags _cxxflags
     unset _ld_o _ldflags _ld_lib _ld_path
@@ -5249,17 +5248,7 @@ probe_cc(){
         gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
         gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever 
\\(.*\\)")
         _ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
-        case $gcc_basever in
-            2) ;;
-            2.*) ;;
-            *) _depflags='-MMD -MF $(@:.o=.d) -MT $@' ;;
-        esac
-        if [ "$first" = true ]; then
-            case $gcc_basever in
-                4.2*)
-                warn "gcc 4.2 is outdated and may miscompile FFmpeg. Please 
use a newer compiler." ;;
-            esac
-        fi
+        _depflags='-MMD -MF $(@:.o=.d) -MT $@'
         _cflags_speed='-O3'
         _cflags_size='-Os'
     elif $_cc --version 2>/dev/null | grep -q ^icc; then
@@ -5422,7 +5411,7 @@ set_ccvars(){
     fi
 }
 
-probe_cc cc "$cc" "true"
+probe_cc cc "$cc"
 cflags_filter=$_flags_filter
 cflags_speed=$_cflags_speed
 cflags_size=$_cflags_size
-- 
2.52.0


From 1fa903748745c29ea076ad37ae0f3341c3671981 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:38:17 +0200
Subject: [PATCH 07/15] configure: remove llvm-gcc support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The llvm-gcc frontend was discontinued in 2012 with a gcc 4.2 base and
cannot pass the C11 support check.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index e2c664d23f..5c52e7e7c3 100755
--- a/configure
+++ b/configure
@@ -5234,13 +5234,6 @@ probe_cc(){
 
     if $_cc --version 2>&1 | grep -q '^GNU assembler'; then
         true # no-op to avoid reading stdin in following checks
-    elif $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
-        _type=llvm_gcc
-        gcc_extra_ver=$(expr "$($_cc --version 2>/dev/null | head -n1)" : 
'.*\((.*)\)')
-        _ident="llvm-gcc $($_cc -dumpversion 2>/dev/null) $gcc_extra_ver"
-        _depflags='-MMD -MF $(@:.o=.d) -MT $@'
-        _cflags_speed='-O3'
-        _cflags_size='-Os'
     elif $_cc -v 2>&1 | grep -qi ^gcc; then
         _type=gcc
         gcc_version=$($_cc --version | head -n1)
@@ -5495,7 +5488,7 @@ add_asflags $extra_cflags
 
 if test -n "$sysroot"; then
     case "$cc_type" in
-        gcc|llvm_gcc|clang)
+        gcc|clang)
             add_cppflags --sysroot="$sysroot"
             add_ldflags --sysroot="$sysroot"
         ;;
@@ -5507,7 +5500,7 @@ if test "$cpu" = host; then
         warn "--cpu=host makes no sense when cross-compiling."
 
     case "$cc_type" in
-        gcc|llvm_gcc)
+        gcc)
             check_native(){
                 : > $TMPC
                 $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
@@ -8024,8 +8017,6 @@ elif enabled gcc; then
             ;;
         esac
     fi
-elif enabled llvm_gcc; then
-    check_allcflags -mllvm -stack-alignment=16
 elif enabled clang; then
     if enabled x86_32; then
         # Clang doesn't support maintaining alignment without assuming the
-- 
2.52.0


From be3385b610cae4b491f11b57637fbe1d5f346b78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:38:37 +0200
Subject: [PATCH 08/15] configure: remove armcc support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This matched ARM Compiler 5 and older, which have no C11 mode. ARM
Compiler 6 is clang-based and detected as clang.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/configure b/configure
index 5c52e7e7c3..999fcbce48 100755
--- a/configure
+++ b/configure
@@ -5256,22 +5256,6 @@ probe_cc(){
         _ident=$($_cc -qversion 2>/dev/null | head -n1)
         _cflags_speed='-O5'
         _cflags_size='-O5 -qcompact'
-    elif $_cc --vsn 2>/dev/null | grep -Eq "ARM (C/C\+\+ )?Compiler"; then
-        test -d "$sysroot" || die "No valid sysroot specified."
-        _type=armcc
-        _ident=$($_cc --vsn | grep -i build | head -n1 | sed 's/.*: //')
-        armcc_conf="$PWD/armcc.conf"
-        $_cc --arm_linux_configure                 \
-             --arm_linux_config_file="$armcc_conf" \
-             --configure_sysroot="$sysroot"        \
-             --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
-             die "Error creating armcc configuration file."
-        $_cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
-        _flags="--arm_linux_config_file=$armcc_conf --translate_gcc"
-        as_default="${cross_prefix}gcc"
-        _depflags='-MMD'
-        _cflags_speed='-O3'
-        _cflags_size='-Os'
     elif $_cc -v 2>&1 | grep -q clang && ! $_cc -? > /dev/null 2>&1; then
         _type=clang
         _ident=$($_cc --version 2>/dev/null | head -n1)
@@ -8044,16 +8028,6 @@ elif enabled clang; then
 elif enabled cparser; then
     add_cflags -Wno-missing-variable-declarations
     add_cflags -Wno-empty-statement
-elif enabled armcc; then
-    add_cflags -W${armcc_opt},--diag_suppress=4343 # hardfp compat
-    add_cflags -W${armcc_opt},--diag_suppress=3036 # using . as system include 
dir
-    # 2523: use of inline assembly is deprecated
-    add_cflags -W${armcc_opt},--diag_suppress=2523
-    add_cflags -W${armcc_opt},--diag_suppress=1207
-    add_cflags -W${armcc_opt},--diag_suppress=1293 # assignment in condition
-    add_cflags -W${armcc_opt},--diag_suppress=3343 # hardfp compat
-    add_cflags -W${armcc_opt},--diag_suppress=167  # pointer sign
-    add_cflags -W${armcc_opt},--diag_suppress=513  # pointer sign
 elif enabled pathscale; then
     add_cflags -fstrict-overflow -OPT:wrap_around_unsafe_opt=OFF
     disable inline_asm
-- 
2.52.0


From 165cd9c0bb488bf9773abe3b9e42e0c106e01df3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:38:50 +0200
Subject: [PATCH 09/15] configure: remove pathscale support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

EKOPath development ended in 2016 without a C11 release.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/configure b/configure
index 999fcbce48..47c4f06f29 100755
--- a/configure
+++ b/configure
@@ -5271,13 +5271,6 @@ probe_cc(){
         _cflags_speed='-O5'
         _cflags_size='-O5 -xspace'
         _flags_filter=suncc_flags
-    elif $_cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
-        _type=pathscale
-        _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
-        _depflags='-MMD -MF $(@:.o=.d) -MT $@'
-        _cflags_speed='-O2'
-        _cflags_size='-Os'
-        _flags_filter='filter_out -Wdisabled-optimization'
     elif $_cc -v 2>&1 | grep -q Open64; then
         _type=open64
         _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
@@ -8028,9 +8021,6 @@ elif enabled clang; then
 elif enabled cparser; then
     add_cflags -Wno-missing-variable-declarations
     add_cflags -Wno-empty-statement
-elif enabled pathscale; then
-    add_cflags -fstrict-overflow -OPT:wrap_around_unsafe_opt=OFF
-    disable inline_asm
 elif enabled_any msvc icl; then
     enabled x86_32 && disable aligned_stack
     enabled_all x86_32 debug && add_cflags -Oy-
-- 
2.52.0


From ba1eadb80cddfb54ad1979abc75ee944c9e0cc0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:39:07 +0200
Subject: [PATCH 10/15] configure: remove open64 support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Development ended in 2011 without a C11 release, and nothing acted on
the detected type anyway.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/configure b/configure
index 47c4f06f29..2a6ae1cb97 100755
--- a/configure
+++ b/configure
@@ -5271,13 +5271,6 @@ probe_cc(){
         _cflags_speed='-O5'
         _cflags_size='-O5 -xspace'
         _flags_filter=suncc_flags
-    elif $_cc -v 2>&1 | grep -q Open64; then
-        _type=open64
-        _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
-        _depflags='-MMD -MF $(@:.o=.d) -MT $@'
-        _cflags_speed='-O2'
-        _cflags_size='-Os'
-        _flags_filter='filter_out 
-Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
     elif $_cc 2>&1 | grep -q 'Microsoft.*ARM.*Assembler'; then
         _type=armasm
         _ident=$($_cc | head -n1)
-- 
2.52.0


From e32a0382261635f45c6bf6a2a930dea349c4c2a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:39:30 +0200
Subject: [PATCH 11/15] configure: remove cparser support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

cparser has no stdatomic support and cannot build FFmpeg with threads.
Development stalled in 2017.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/configure b/configure
index 2a6ae1cb97..1e99d72fb5 100755
--- a/configure
+++ b/configure
@@ -5091,18 +5091,6 @@ armasm_flags(){
    done
 }
 
-cparser_flags(){
-    for flag; do
-        case $flag in
-            -Wno-switch)             echo -Wno-switch-enum ;;
-            -Wno-format-zero-length) ;;
-            -Wdisabled-optimization) ;;
-            -Wno-pointer-sign)       echo -Wno-other ;;
-            *)                       echo $flag ;;
-        esac
-    done
-}
-
 msvc_common_flags(){
     for flag; do
         case $flag in
@@ -5347,13 +5335,6 @@ probe_cc(){
         _flags='-nologo'
         _cxxflags='-Zc:__cplusplus -EHsc'
         disable stripping
-    elif $_cc --version 2>/dev/null | grep -q ^cparser; then
-        _type=cparser
-        _ident=$($_cc --version | head -n1)
-        _depflags='-MMD'
-        _cflags_speed='-O4'
-        _cflags_size='-O2'
-        _flags_filter=cparser_flags
     fi
 
     eval ${pfx}_type=\$_type
@@ -8011,9 +7992,6 @@ elif enabled clang; then
     check_allcflags -Werror=implicit-function-declaration
     check_allcflags -Werror=missing-prototypes
     check_allcflags -Werror=return-type
-elif enabled cparser; then
-    add_cflags -Wno-missing-variable-declarations
-    add_cflags -Wno-empty-statement
 elif enabled_any msvc icl; then
     enabled x86_32 && disable aligned_stack
     enabled_all x86_32 debug && add_cflags -Oy-
-- 
2.52.0


From f1b81b6f0ad58829a3e49617876411c698153847 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:39:44 +0200
Subject: [PATCH 12/15] configure: remove icc version check for aligned stack
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

icc older than 11 cannot pass the C11 support check.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/configure b/configure
index 1e99d72fb5..b690a295af 100755
--- a/configure
+++ b/configure
@@ -7923,12 +7923,7 @@ if enabled icc; then
     check_ldflags -wd10156,11030
     # The test above does not test linking
     [ -n "$lto" ] && disable symver_asm_label
-    if enabled x86_32; then
-        icc_version=$($cc -dumpversion)
-        test ${icc_version%%.*} -ge 11 &&
-            check_cppflags -falign-stack=maintain-16-byte ||
-            disable aligned_stack
-    fi
+    enabled x86_32 && check_cppflags -falign-stack=maintain-16-byte
 elif enabled gcc; then
     gcc_version=$($cc -dumpversion)
     major_version=${gcc_version%%[!0-9]*}
-- 
2.52.0


From 7c312de8ddc731f5f969e97960bfe65117289788 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:41:08 +0200
Subject: [PATCH 13/15] avutil: remove always-true GCC version checks in
 internal headers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Every GCC able to pass the C11 configure check provides these builtins,
attributes and pragmas. Public headers are left untouched since they
must keep working with C99 compilers.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavutil/attributes_internal.h |  2 +-
 libavutil/internal.h            |  2 +-
 libavutil/intmath.h             | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavutil/attributes_internal.h b/libavutil/attributes_internal.h
index 15d89120ad..7031a61b41 100644
--- a/libavutil/attributes_internal.h
+++ b/libavutil/attributes_internal.h
@@ -21,7 +21,7 @@
 
 #include "attributes.h"
 
-#if (AV_GCC_VERSION_AT_LEAST(4,0) || defined(__clang__)) && (defined(__ELF__) 
|| defined(__MACH__))
+#if defined(__GNUC__) && (defined(__ELF__) || defined(__MACH__))
 #    define attribute_visibility_hidden __attribute__((visibility("hidden")))
 #    define FF_VISIBILITY_PUSH_HIDDEN   _Pragma("GCC visibility push(hidden)")
 #    define FF_VISIBILITY_POP_HIDDEN    _Pragma("GCC visibility pop")
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 2040937bfb..88a4d29f2c 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -44,7 +44,7 @@
 #include "macros.h"
 
 #ifndef attribute_align_arg
-#if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2)
+#if ARCH_X86_32 && defined(__GNUC__)
 #    define attribute_align_arg __attribute__((force_align_arg_pointer))
 #else
 #    define attribute_align_arg
diff --git a/libavutil/intmath.h b/libavutil/intmath.h
index b177a848c6..a32e225895 100644
--- a/libavutil/intmath.h
+++ b/libavutil/intmath.h
@@ -35,14 +35,14 @@
 #endif
 
 #if HAVE_FAST_CLZ
-#if AV_GCC_VERSION_AT_LEAST(3,4) || AV_HAS_BUILTIN(__builtin_clz)
+#if defined(__GNUC__) || AV_HAS_BUILTIN(__builtin_clz)
 #ifndef ff_log2
 #   define ff_log2(x) (31 - __builtin_clz((x)|1))
 #   ifndef ff_log2_16bit
 #      define ff_log2_16bit av_log2
 #   endif
 #endif /* ff_log2 */
-#endif /* AV_GCC_VERSION_AT_LEAST(3,4) */
+#endif /* defined(__GNUC__) || AV_HAS_BUILTIN(__builtin_clz) */
 #endif
 
 extern const uint8_t ff_log2_tab[256];
@@ -90,13 +90,13 @@ static av_always_inline av_const int 
ff_log2_16bit_c(unsigned int v)
  */
 
 #if HAVE_FAST_CLZ
-#if !defined(ff_ctz) && (AV_GCC_VERSION_AT_LEAST(3,4) || 
AV_HAS_BUILTIN(__builtin_ctz))
+#if !defined(ff_ctz) && (defined(__GNUC__) || AV_HAS_BUILTIN(__builtin_ctz))
 #define ff_ctz(v) __builtin_ctz(v)
 #endif
-#if !defined(ff_ctzll) && (AV_GCC_VERSION_AT_LEAST(3,4) || 
AV_HAS_BUILTIN(__builtin_ctzll))
+#if !defined(ff_ctzll) && (defined(__GNUC__) || 
AV_HAS_BUILTIN(__builtin_ctzll))
 #define ff_ctzll(v) __builtin_ctzll(v)
 #endif
-#if !defined(ff_clz) && (AV_GCC_VERSION_AT_LEAST(3,4) || 
AV_HAS_BUILTIN(__builtin_clz))
+#if !defined(ff_clz) && (defined(__GNUC__) || AV_HAS_BUILTIN(__builtin_clz))
 #define ff_clz(v) __builtin_clz(v)
 #endif
 #endif
@@ -152,7 +152,7 @@ static av_always_inline av_const unsigned ff_clz_c(unsigned 
x)
 }
 #endif
 
-#if AV_GCC_VERSION_AT_LEAST(3,4) || AV_HAS_BUILTIN(__builtin_parity)
+#if defined(__GNUC__) || AV_HAS_BUILTIN(__builtin_parity)
 #ifndef av_parity
 #define av_parity __builtin_parity
 #endif
-- 
2.52.0


From 0a3bf91da2f6be0b936b9e9f86040d8fbfce1470 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:41:23 +0200
Subject: [PATCH 14/15] avcodec: remove checks for compilers that cannot pass
 the C11 check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

gcc 4.4, clang 2.x and llvm-gcc are all older than the C11 requirement.
Only the icl case of BROKEN_COMPILER remains.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavcodec/arm/dca.h   | 2 +-
 libavcodec/x86/cabac.h | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/arm/dca.h b/libavcodec/arm/dca.h
index ae4b730a8a..46c36bd335 100644
--- a/libavcodec/arm/dca.h
+++ b/libavcodec/arm/dca.h
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "libavcodec/mathops.h"
 
-#if HAVE_ARMV6_INLINE && AV_GCC_VERSION_AT_LEAST(4,4) && !CONFIG_THUMB
+#if HAVE_ARMV6_INLINE && !CONFIG_THUMB
 
 #define decode_blockcodes decode_blockcodes
 static inline int decode_blockcodes(int code1, int code2, int levels,
diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index dc384f89b2..396e8e9841 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -29,9 +29,7 @@
 #include "libavutil/x86/asm.h"
 #include "config.h"
 
-#if   (defined(__i386) && defined(__clang__) && (__clang_major__<2 || 
(__clang_major__==2 && __clang_minor__<10)))\
-   || (                  !defined(__clang__) && defined(__llvm__) && 
__GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\
-   || (defined(__INTEL_COMPILER) && defined(_MSC_VER))
+#if defined(__INTEL_COMPILER) && defined(_MSC_VER)
 #       define BROKEN_COMPILER 1
 #else
 #       define BROKEN_COMPILER 0
-- 
2.52.0


From 915b0f264ed3a714ee316ccba293aebe73328b87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 22 Aug 2026 17:41:44 +0200
Subject: [PATCH 15/15] swscale/uops_backend: remove always-true GCC version
 checks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The clang exclusion on the finite-math-only pragma is kept, previously
implied by clang reporting itself as gcc 4.2.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 libswscale/uops_backend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswscale/uops_backend.c b/libswscale/uops_backend.c
index 5b35c1b585..5208155706 100644
--- a/libswscale/uops_backend.c
+++ b/libswscale/uops_backend.c
@@ -28,13 +28,13 @@
  */
 #ifdef __clang__
 #pragma STDC FP_CONTRACT OFF
-#elif AV_GCC_VERSION_AT_LEAST(4, 8)
+#elif defined(__GNUC__)
 #pragma GCC optimize ("fp-contract=off")
 #elif defined(_MSC_VER)
 #pragma fp_contract (off)
 #endif
 
-#if AV_GCC_VERSION_AT_LEAST(4, 4)
+#if defined(__GNUC__) && !defined(__clang__)
 #pragma GCC optimize ("finite-math-only")
 #endif
 
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to