Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Kacper Michajlow <kasper93-at-gmail.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] configure: fix Microsoft tools detection
Date: Mon, 16 Jun 2025 15:24:27 +0200
Message-ID: <CABPLASSyWX7OVExXPJ245eZib-4PzSHc_mrvLkV8dUsob56+Ow@mail.gmail.com> (raw)
In-Reply-To: <dee0f60-af7-a49a-840-1b7ed7a7ce4@martin.st>

On Mon, 16 Jun 2025 at 09:40, Martin Storsjö <martin@martin.st> wrote:
>
> On Sat, 14 Jun 2025, Kacper Michajlow wrote:
>
> > On Sat, 14 Jun 2025 at 03:03, Kacper Michajłow <kasper93@gmail.com> wrote:
> >>
> >> LLVM tools print installation path upon execution. If one uses LLVM
> >> tools bundled with Microsoft Visual Studio installation, they would be
> >> incorrectly detected as Microsoft's ones.
> >>
> >> Microsoft tools can have localized names, so a more specific string
> >> check is not feasible, but luckily we can test if "Microsoft" is at the
> >> beginning of the line, as it is always the case.
> >>
> >> Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
> >> ---
> >>  configure | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/configure b/configure
> >> index 534b443f7d..5b2a04ae6a 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -5124,9 +5124,9 @@ probe_cc(){
> >>          _flags_filter=msvc_flags
> >>          _ld_lib='lib%.a'
> >>          _ld_path='-libpath:'
> >> -    elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
> >> +    elif $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
> >>          _type=msvc
> >> -        if $_cc -nologo- 2>&1 | grep -q Microsoft; then
> >> +        if $_cc -nologo- 2>&1 | grep -q ^Microsoft; then
> >>              _ident=$($_cc 2>&1 | head -n1 | tr -d '\r')
> >>          else
> >>              _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r')
> >> @@ -5236,7 +5236,7 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
> >>      DEPCCFLAGS=$_flags
> >>  fi
> >>
> >> -if $ar 2>&1 | grep -q Microsoft; then
> >> +if $ar 2>&1 | grep -q ^Microsoft; then
> >>      arflags="-nologo"
> >>      ar_o='-out:$@'
> >>  elif $ar 2>&1 | grep -q "\[D\] "; then
> >> --
> >> 2.45.1
> >>
> >
> > Should be v2 to the previous patch, but forgot to tag it as such.
>
> Hmm, not sure where that previous patch was - I don't see it recently at
> least.

Yep, it was a very old one. See
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20220122201321.8368-1-kasper93@gmail.com/
The conclusion was that we cannot do it like that, because names are
localized. Hence now the new patch, which should work nicely for all
cases, even if a little bit of basic change.

- Kacper
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2025-06-16 13:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-14  1:03 Kacper Michajłow
2025-06-14  1:05 ` Kacper Michajlow
2025-06-16  7:40   ` Martin Storsjö
2025-06-16 13:24     ` Kacper Michajlow [this message]
2025-06-17  9:16       ` Martin Storsjö
  -- strict thread matches above, loose matches on Subject: below --
2022-01-22 20:13 [FFmpeg-devel] [PATCH] configure: Fix " Kacper Michajłow
2022-01-26 14:00 ` Martin Storsjö
2022-02-03  6:44   ` Kacper Michajlow
2022-02-03 11:34     ` Martin Storsjö
2022-02-03 11:55       ` Hendrik Leppkes
2022-02-03 12:08         ` Marvin Scholz
2022-02-03 12:26         ` Marvin Scholz
2022-02-03 12:33           ` Martin Storsjö
2022-02-03 12:43             ` Marvin Scholz
2022-02-03 12:47               ` Martin Storsjö
2022-02-03 16:02                 ` Marvin Scholz
2022-02-07 21:00           ` Martin Storsjö

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=CABPLASSyWX7OVExXPJ245eZib-4PzSHc_mrvLkV8dUsob56+Ow@mail.gmail.com \
    --to=kasper93-at-gmail.com@ffmpeg.org \
    --cc=ffmpeg-devel@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