* [FFmpeg-devel] [PATCH] configure: pick more sensible cxx_default if user provided custom cc (PR #20536)
@ 2025-09-16 21:02 Timo Rothenpieler via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Timo Rothenpieler via ffmpeg-devel @ 2025-09-16 21:02 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Timo Rothenpieler
PR #20536 opened by Timo Rothenpieler (BtbN)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20536
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20536.patch
This way `./configure --cc=x86_64-pc-linux-gnu-clang` and the like will do something sensible, same for variants of gcc.
>From 93c3dee02af15a3c3ec51a6e05712fb18f9867a9 Mon Sep 17 00:00:00 2001
From: Timo Rothenpieler <timo@rothenpieler.org>
Date: Tue, 16 Sep 2025 22:47:26 +0200
Subject: [PATCH] configure: pick more sensible cxx_default if user provided
custom cc
---
configure | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/configure b/configure
index 8def62a5d9..9b19bb13e2 100755
--- a/configure
+++ b/configure
@@ -4811,6 +4811,7 @@ fi
set_default target_os
if test "$target_os" = android; then
cc_default="clang"
+ cxx_default="clang++"
fi
ar_default="${cross_prefix}${ar_default}"
@@ -4822,6 +4823,18 @@ ranlib_default="${cross_prefix}${ranlib_default}"
strip_default="${cross_prefix}${strip_default}"
windres_default="${cross_prefix}${windres_default}"
+case "$cc" in
+ *gcc*)
+ cxx_default="$(echo "$cc" | sed 's/\(.*\)gcc/\1g++/')"
+ ;;
+ *clang*)
+ cxx_default="$(echo "$cc" | sed 's/\(.*\)clang/\1clang++/')"
+ ;;
+ *cl.exe|*cl|*icl)
+ cxx_default="$cc"
+ ;;
+esac
+
sysinclude_default="${sysroot}/usr/include"
if enabled cuda_sdk; then
--
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-09-16 21:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-16 21:02 [FFmpeg-devel] [PATCH] configure: pick more sensible cxx_default if user provided custom cc (PR #20536) Timo Rothenpieler 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