diff mbox

Re-factor inclusion of tree.h

Message ID CAD_=9DTjEzu_Yo9ZGbsQUGV+1sRyB=u+H=fO3Q5Pp1aHhJEm3g@mail.gmail.com
State New
Headers show

Commit Message

Diego Novillo Oct. 21, 2013, 7:36 p.m. UTC
On Mon, Oct 21, 2013 at 12:57 PM, Jeff Law <law@redhat.com> wrote:
> On 10/21/13 10:52, Diego Novillo wrote:
>>
>> I plan to commit this by tomorrow, unless there are objections.
>
> I can't think of a good reason to even bother waiting :-)

Heh, OK, thanks.

After analyzing all the build failures in config-list.mk, I found that
we also need explicit inclusion of tree.h in the gen* binaries. Some
of these generate all their includes in header files, but I figured we
can revise this later on. This was breaking cr16-elf and mips-netbsd.

Can anyone think of some way that we can use to automatically block
inclusions of tree.h from header files? Code review is the only way
that comes to mind.

Committed both patches to trunk.

Diego.
diff mbox

Patch

diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 973cade..f79380d 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -5100,6 +5100,7 @@  write_header (FILE *outf)
   fprintf (outf, "#include \"system.h\"\n");
   fprintf (outf, "#include \"coretypes.h\"\n");
   fprintf (outf, "#include \"tm.h\"\n");
+  fprintf (outf, "#include \"tree.h\"\n");
   fprintf (outf, "#include \"rtl.h\"\n");
   fprintf (outf, "#include \"insn-attr.h\"\n");
   fprintf (outf, "#include \"tm_p.h\"\n");
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index a0bf076..f6c4b91c4 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -9665,6 +9665,7 @@  main (int argc, char **argv)
  "#include \"system.h\"\n"
  "#include \"coretypes.h\"\n"
  "#include \"tm.h\"\n"
+ "#include \"tree.h\"\n"
  "#include \"rtl.h\"\n"
  "#include \"tm_p.h\"\n"
  "#include \"insn-config.h\"\n"
diff --git a/gcc/genemit.c b/gcc/genemit.c
index d4bb301..724a114 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -790,6 +790,7 @@  from the machine description file `md'.  */\n\n");
   printf ("#include \"system.h\"\n");
   printf ("#include \"coretypes.h\"\n");
   printf ("#include \"tm.h\"\n");
+  printf ("#include \"tree.h\"\n");
   printf ("#include \"rtl.h\"\n");
   printf ("#include \"tm_p.h\"\n");
   printf ("#include \"function.h\"\n");
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index 9c7cf2c..3efb71e 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -404,6 +404,7 @@  main (int argc, char **argv)
    "#include \"system.h\"\n"
    "#include \"coretypes.h\"\n"
    "#include \"tm.h\"\n"
+   "#include \"tree.h\"\n"
    "#include \"rtl.h\"\n"
    "#include \"tm_p.h\"\n"
    "#include \"flags.h\"\n"
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index c3a0936..2a7ee23 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -238,6 +238,7 @@  output_prologue (void)
   printf ("#include \"tm.h\"\n");
   printf ("#include \"flags.h\"\n");
   printf ("#include \"ggc.h\"\n");
+  printf ("#include \"tree.h\"\n");
   printf ("#include \"rtl.h\"\n");
   printf ("#include \"expr.h\"\n");
   printf ("#include \"insn-codes.h\"\n");
diff --git a/gcc/genpeep.c b/gcc/genpeep.c
index a14d061..877fde3 100644
--- a/gcc/genpeep.c
+++ b/gcc/genpeep.c
@@ -359,6 +359,7 @@  from the machine description file `md'.  */\n\n");
   printf ("#include \"coretypes.h\"\n");
   printf ("#include \"tm.h\"\n");
   printf ("#include \"insn-config.h\"\n");
+  printf ("#include \"tree.h\"\n");
   printf ("#include \"rtl.h\"\n");
   printf ("#include \"tm_p.h\"\n");
   printf ("#include \"regs.h\"\n");
diff --git a/gcc/target-globals.c b/gcc/target-globals.c
index 65ccb8a..9d223fc 100644
--- a/gcc/target-globals.c
+++ b/gcc/target-globals.c
@@ -23,6 +23,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "insn-config.h"
 #include "machmode.h"
+#include "tree.h"
 #include "ggc.h"
 #include "toplev.h"
 #include "target-globals.h"