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.

> @@ -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.

> @@ -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?

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to