This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Remove middle end #includes from java front end
- From: Mikael Pettersson <mikpe at it dot uu dot se>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 6 Jun 2010 17:39:18 +0200
- Subject: Re: [patch] Remove middle end #includes from java front end
- References: <AANLkTik9gOivXqZrT2Sq8MbJCfwfYThmOkr4wyaIaMRy@mail.gmail.com>
On Sun, 23 May 2010, Steven Bosscher wrote:
> Cleans up some redundant #include's from the java front end. There are
> still a couple of middle-end dependencies (just like in the other
> front ends) but it's a step in the right direction.
>
> Bootstrapped on x86_64-unknown-linux-gnu.
> OK for trunk?
>
> Ciao!
> Steven
>
> * java-gimplify.c: Do not include tm.h, toplev.h.
> * typeck.c: Do not include tm.h.
> * mangle_name.c: Do not include tm.h.
> * jcf-dump.c: Do not include tm.h, ggc.h.
> * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
> * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
> and timevar.h.
> * jcf-parse.c: Do not include tm.h and tm_p.h.
> * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
> target.h, and expr.h.
> * except.c: Do not include tm.h, rtl.h, function.h.
> * builtins.c: Do not include convert.h. Explain why RTL headers
> have to be included here.
> * verify-glue.c: Do not include tm.h.
> * jcf-depend.c: Do not include tm.h.
> * jcf-reader.c: Include ggc.h.
> * jcf-io.c: Do not include tm.h, toplev.h.
> * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
> gimple.h.
> * lang.c: Do not include rtl.h, expr.h.
This broke java bootstrap on ARM as reported in PR44335.
The breakage in except.c was fixed in r160039, but jcf-parse.c
still fails today:
/home/mikpe/gcc-4.6-20100605/gcc/java/jcf-parse.c: In function 'handle_constant':
/home/mikpe/gcc-4.6-20100605/gcc/java/jcf-parse.c:565:9: error: implicit declaration of function 'arm_float_words_big_endian' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[3]: *** [java/jcf-parse.o] Error 1
make[3]: Leaving directory `/home/mikpe/objdir46/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/mikpe/objdir46'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/mikpe/objdir46'
make: *** [bootstrap] Error 2
It turns out that jcf-parse.c needs both tm.h and tm_p.h on ARM, with
neither or only one included native builds error out. The following
patch adds those includes back, and has been checked to fix this bootstrap
failure on arm-linux-gnueabi. I've also checked that it didn't break
bootstrap on i686-linux.
Ok for trunk? (I don't have svn write access.)
gcc/java/
2010-06-06 Mikael Pettersson <mikpe@it.uu.se>
PR bootstrap/44335
* jcf-parse.c: Include tm.h and tm_p.h.
--- gcc-4.6-20100605/gcc/java/jcf-parse.c.~1~ 2010-06-06 14:53:45.000000000 +0200
+++ gcc-4.6-20100605/gcc/java/jcf-parse.c 2010-06-06 14:53:50.000000000 +0200
@@ -27,6 +27,7 @@ The Free Software Foundation is independ
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "tm.h"
#include "tree.h"
#include "obstack.h"
#include "flags.h"
@@ -39,6 +40,7 @@ The Free Software Foundation is independ
#include "ggc.h"
#include "debug.h"
#include "assert.h"
+#include "tm_p.h"
#include "cgraph.h"
#include "vecprim.h"
#include "bitmap.h"