Hi Segher,

On 7/21/21 1:58 PM, Segher Boessenkool wrote:
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?)
OK.  Yeah, I'm a little surprised looking at this diff now...I wonder if it got removed by accident by some previous patch.  I'll investigate.

The changelog entry should read
        * config.gcc (powerpc*-*-*): Include [...] in extra_objs.
or similar.
OK, thanks!  Will fix.

        * 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?
Well, I'm as puzzled as you are.  I'll remove the $(CXXFLAGS) and see if anything goes wrong to remind me...but I think it's just unnecessary.

+# 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.
I think this is too artificial.  Right now I just make the two generated .h files depend on the generated .c file, which works since they are all generated together or none of them are generated.  That seems simple enough and more self-documenting to me.

+EXTRA_HEADERS += rs6000-vecdefines.h
+rs6000-vecdefines.h : rs6000-builtins.c
No space before the colon please.

Oopsie.

Thanks!
Bill



Segher

Reply via email to