gcj cross-compilation
David Daney
ddaney@avtrex.com
Fri Aug 26 16:10:00 GMT 2005
Nathan M wrote:
>>I managed to build one using crosstool. I had to try a couple of
>>different gcc versions though as some of them failed to build libgcj
>>properly. I'm afraid I haven't kept a copy of the binary though so I
>>can't send you one. If you are thinking of using this for embedded
>>work then be warned I've found you need 32mb of ram at an absolute
>>minimum.
>>> Are you suggesting 32mb of ram is needed on the host machine running
> the cross compiler or 32mb is needed on the embedded target to run the
> native apps compiled in gcj?
Speaking again of MIPS not arm, but the executable produced by gcj are
huge. Using static linking of libgcj the smallest Hello world program
it 3.3MB. Depending of the size of your program I think you would
probably be able to run with 16MB total ram. But trying to run gcj
compiled programs in 8MB or less is probably going to be difficult.
Your kernel is going to use 2-3MB of ram, so that would leave only 5 - 6
available for programs.
With a small heap I think you could probably run a fairly large program
in 16MB. We have a program that is about 100,000 lines of java code
that runs with a 6MB limited heap that runs in 20MB of ram (including
the linux kernel, init, and several other small programs).
David Daney.
More information about the Java
mailing list