Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Timo Rothenpieler via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Timo Rothenpieler <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] configure: pick more sensible cxx_default if user provided custom cc (PR #20536)
Date: Tue, 16 Sep 2025 21:02:50 -0000
Message-ID: <175805657084.25.3899181204404508522@463a07221176> (raw)

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

                 reply	other threads:[~2025-09-16 21:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=175805657084.25.3899181204404508522@463a07221176 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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