[FFmpeg-devel] [PATCH] configure: Set MSVC as_default later.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jan 16 01:56:34 EET 2021



> On 15 Jan 2021, at 23:25, Martin Storsjö <martin at martin.st> wrote:
> 
> On Fri, 15 Jan 2021, Reimar.Doeffinger at gmx.de wrote:
> 
>> From: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
>> 
>> It would get immediately overridden to $cc, which in case
>> of gas-preprocessor missing would result in it trying
>> to use cl.exe for asm files instead of erroring out.
>> This is because cl.exe does not fail but just print a warning
>> when it is given a file it does not know what to do with it...
> 
> As this setup seems to work fine in the setups I've tried, can you think of why it's overwritten with $cc in your cases?
> 
> With the line
>    : ${as_default:=$cc}
> it only sets as_default to $cc if $as_default is empty.

Actually after a few debug prints it’s clear what actually happens:
$arch is not set at that point unless specified on command-line.
Not sure if it’s reasonable to just check arch_default as fallback or such?

> You can't really do that here. Probe_cc only should set the existing set of _type/_ident/_ldflags/_cflags* etc variables, which are picked up by the caller of probe_cc. probe_cc is called separately for both host and target compilers, so if e.g. cross compiling, with MSVC as host compiler, with a different compiler for the target, this wouldn't do the right thing.

Then the armcc logic in there is broken I guess?



More information about the ffmpeg-devel mailing list