PR #24631 opened by Martin Storsjö (mstorsjo) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24631 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24631.patch
Many toolchains provide compilers named "gcc" (or "<triple>-gcc") that still are identified as cc_type="clang" by our configure. For these, rewrite "gcc" into "g++", rather than rewriting "cc" into "c++" (which results in "gc++"). This fixes the default value of cxx on macOS when no compiler is specified by the user (where we default to "gcc") after 662ea4a3e71ad91e4e26a65b9ccf09f349c2f921. From 52f05ac7809e6b5ef24ca0127c334f63a7b911d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <[email protected]> Date: Tue, 22 Sep 2026 11:38:14 +0300 Subject: [PATCH] configure: Rewrite "gcc" into "g++" for clang type compilers as well Many toolchains provide compilers named "gcc" (or "<triple>-gcc") that still are identified as cc_type="clang" by our configure. For these, rewrite "gcc" into "g++", rather than rewriting "cc" into "c++" (which results in "gc++"). This fixes the default value of cxx on macOS when no compiler is specified by the user (where we default to "gcc") after 662ea4a3e71ad91e4e26a65b9ccf09f349c2f921. --- configure | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 7a303f146f..84ab8beb4b 100755 --- a/configure +++ b/configure @@ -5447,11 +5447,11 @@ test -n "$cc_type" && enable $cc_type || : ${host_ld_default:=$host_cc} case $cc_type,$cc in - gcc,*gcc*) cxx_default="${cc%gcc*}g++${cc##*gcc}" ;; - clang,*clang*) cxx_default="${cc%clang*}clang++${cc##*clang}" ;; - gcc,*cc*|clang,*cc*) cxx_default="${cc%cc*}c++${cc##*cc}" ;; - icc,*icc*) cxx_default="${cc%icc*}icpc${cc##*icc}" ;; - *) cxx_default=$cc ;; + clang,*clang*) cxx_default="${cc%clang*}clang++${cc##*clang}" ;; + gcc,*gcc*|clang,*gcc*) cxx_default="${cc%gcc*}g++${cc##*gcc}" ;; + gcc,*cc*|clang,*cc*) cxx_default="${cc%cc*}c++${cc##*cc}" ;; + icc,*icc*) cxx_default="${cc%icc*}icpc${cc##*icc}" ;; + *) cxx_default=$cc ;; esac set_default ar as cxx objcc dep_cc ld ln_s host_ld windres response_files -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
