This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: GCJ as cross-compiler to embedded system
- From: Gustav Kälvesten <gustav dot kalvesten at axis dot com>
- To: "'tromey at redhat dot com'" <tromey at redhat dot com>
- Cc: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: Tue, 4 Dec 2001 07:49:40 +0100
- Subject: RE: GCJ as cross-compiler to embedded system
Hi Tom,
> Gustav> We are looking into bringing a JavaVM to our embedded systems
> Gustav> platform (eCos as OS and ETRAX processor). We are currently
> Gustav> using 'gcc' as cross-compiler for our development work. A
> Gustav> question that has arisen is if it is possible to use 'gcj' to
> Gustav> compile the class libraries of the JavaVM into native code?
> Gustav> This should improve the speed drastically, right? Anyone who
> Gustav> has done this and has any input on the difficulties and
> Gustav> performance improvement?
>
> When you say "class libraries of the JavaVM", what do you mean?
> gcj can compile a lot of Java code. However, you can't really use it
> to compile the base libraries. You have to use the base libraries
> which come with it.
What we was thinking was to compile the base classes of the Sun J2ME CVM
and its CDC-Foundation packages to native code with gcj. Isn't that possible?
Perhaps I'm using the wrong terms. Perhaps better to say that we plan to use gcc with the Java front-end.
> In the past we've had libgcj running on eCos. This port has
> bit-rotted a bit, but it should be possible to resurrect it.
I don't think there is a need for libgcj in our case?
Is the eCos port available somewhere?
> gcj can improve performance, but I believe the current state is that
> it is about equivalent to the current generation of JITs. On the
> other hand, in an embedded context it may be more attractive because
> JITs memory in which to compile code, whereas gcj does not.
>
> As always, which approach is best is highly dependent on the
> constraints under which you operate.
As the Sun CVM currently doesn't include a JIT we don't have such an option.
And as you say, we have quite limited memory resources unfortunately.
- Gustav