[FFmpeg-devel] [PATCH]configure: Get the correct ident for clang-cl.exe

Martin Storsjö martin at martin.st
Thu Mar 26 12:30:24 EET 2020


On Thu, 26 Mar 2020, Carl Eugen Hoyos wrote:

> Hi!
>
> Attached patch avoids that ffmpeg claims its compiler was "No input
> file" when using clang-cl.
>
> Please comment, Carl Eugen

> @@ -4663,7 +4663,11 @@ probe_cc(){
>          _ld_path='-libpath:'
>      elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | 
grep -q clang && $_cc -? > /dev/null 2>&1; }; then
>          _type=msvc
> -        _ident=$($_cc 2>&1 | head -n1 | tr -d '\r')
> +        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)

The change looks good to me, but isn't "tr -d '\r'" (potentially) needed 
here as well?

// Martin



More information about the ffmpeg-devel mailing list