This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: If you don't have a previous incarnation of GCJ installed...


Zack Weinberg wrote:

> > In Java, "foo" implicitly extends java.lang.Object, so GCJ must load
> > at least that class in order to determine layouts for fields,
> > vtables, etc.
>
> But shouldn't it be possible to disable that?  It makes sense while
> building normal code, but this is the runtime library.

Nope. GCJ simply can't produce a valid object file without knowing the layout of the
super class.

> What seems most wrong, to me, is that jc1 looks for java.lang.Object
> before it even touches the input file.  Surely this should be
> compilable without external references:
>
> package java.lang;
> class Object {}

Yep. Unfortunately, GCJ makes certain assumptions about the layout of
java.lang.Object, and will crash if you change it too much. This is a bug, and there
is a PR about it, but it isn't likely to get fixed in a hurry. Its worth noting that
jikes won't compile this either without some standard libraries on the classpath (it
complains about missing java.util package).

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]