On Thu, Jun 17, 2021 at 10:19:07AM -0500, Bill Schmidt wrote:
> 2021-06-07  Bill Schmidt  <wschm...@linux.ibm.com>
> 
> gcc/
>       * config.gcc (extra_objs): Include rs6000-builtins.o and
>       rs6000-c.o.

The rs6000-c.o part needs an explanation, and probably should be a
separate (bugfix) patch (and it needs backports?)

The changelog entry should read
        * config.gcc (powerpc*-*-*): Include [...] in extra_objs.
or similar.

>       * config/rs6000/t-rs6000 (rs6000-gen-builtins.o): New target.
>       (rbtree.o): Likewise.
>       (rs6000-gen-builtins): Likewise.
>       (rs6000-builtins.c): Likewise.
>       (rs6000-builtins.h): Likewise.
>       (rs6000.o): Add dependency.
>       (EXTRA_HEADERS): Add rs6000-vecdefines.h.
>       (rs6000-vecdefines.h): New target.
>       (rs6000-builtins.o): Likewise.
>       (rs6000-call.o): Add rs6000-builtins.h as a dependency.
>       (rs6000-c.o): Likewise.

> +rs6000-gen-builtins.o: $(srcdir)/config/rs6000/rs6000-gen-builtins.c
> +     $(COMPILE) $(CXXFLAGS) $<
> +     $(POSTCOMPILE)
> +
> +rbtree.o: $(srcdir)/config/rs6000/rbtree.c
> +     $(COMPILE) $<
> +     $(POSTCOMPILE)

Why does one need CXXFLAGS and the other does not?

> +# TODO: Whenever GNU make 4.3 is the minimum required, we should use
> +# grouped targets on this:

That may be quite a while still.  GNU make is the foundation of
everything, so we cannot require very new versions of it ever.

In the meantime, you can make all these targets depend on an
intermediate target (that you mark with .INTERMEDIATE), and have that
intermediate target have the dependencies.  This is from version 3.74.3
and we require 3.80 already, so this is fine.

> +EXTRA_HEADERS += rs6000-vecdefines.h
> +rs6000-vecdefines.h : rs6000-builtins.c

No space before the colon please.


Segher

Reply via email to