Diego Biurrun <[email protected]> writes:

> On Wed, Jul 25, 2012 at 02:10:05PM +0100, Mans Rullgard wrote:
>> This adds a full identification probe of CC, AS, LD and HOSTCC,
>> and sets up correct flags and dependency tracking for each.
>
> Give me a bit more time to review this please, I have some ideas
> I would like to try.
>
>> --- a/configure
>> +++ b/configure
>> @@ -1742,8 +1744,8 @@ target_path='$(CURDIR)'
>>  
>>  # since the object filename is not given with the -MM flag, the compiler
>>  # is only able to print the basename, and we must add the path ourselves
>> -DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e 
>> "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
>> -DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
>> +DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "/^\#.*/d" 
>> -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
>> +DEPFLAGS='-MM'
>
> Food for thought: Does it make sense to set gcc-specific defaults here?
> We might as well set this in the gcc section instead and not provide a
> default, which is very unlikely to work with a foreign compiler anyway.

These flags work several non-gcc compilers, and even more work with the
same sed mangling.

>> @@ -2043,120 +2045,150 @@ tms470_flags(){
>>  
>> -    if ! $cc -dumpversion | grep -q '^2\.'; then
>> -        CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
>> -        AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
>> +        if ! $_cc -dumpversion | grep -q '^2\.'; then
>> +            _depflags='-MMD -MF $(@:.o=.d) -MT $@'
>> +        fi
>
> This, btw, is gcc 2.95 cruft that we need to drop.

I'm sure someone will cry bloody murder if we do, just like they always
do when we drop anything.

>> @@ -3358,6 +3405,9 @@ CC=$cc
>>  AS=$as
>>  LD=$ld
>>  DEPCC=$dep_cc
>> +DEPCCFLAGS=$DEPCCFLAGS \$(CPPFLAGS)
>> +DEPAS=$as
>> +DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
>
> You're assuming depas == as here because the only as we support is gcc?

There is no way to set anything else, and I have yet to come across a
case where it would be needed.  A few other compilers can act as driver
for the gnu assembler, but they can all generate dependencies one way or
another.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to