Eclipse and gcj

One of the big projects in gcj land this year is implementing the
new binary compatibility ABI. I spent today trying it out on
Eclipse.

First I tried to set a baseline, so I ran Eclipse with gij. I had
to add Mark’s little Makefile tweak to make this work (now on the
branch); unit-at-a-time breaks the interpreter at the moment. BTW I
used Eclipse 2.x, since I knew it “should” work — but this technique
doesn’t require application changes, and Eclipse 3 is definitely on my
to-do list.

Then I compiled startup.jar like so:

gcj -fPIC -fjni -findirect-dispatch -shared -g -o GCJLIBS/startup.jar.so startup.jar

After a little tweak to URLClassLoader (also checked in),
this Eclipse started up fine too. Finally I compiled a few more jar
files from Eclipse using the same approach, and that worked too — I
looked in /proc/.../maps to see that the shared libraries
were actually loaded.

This, or something like it, is definitely the way forward. It has
turned precompiling Eclipse from a labor-intensive effort to something
that is basically trivial, and also that applies well to other
applications. There’s still some dispute about where we should look
for the shared libraries corresponding to jar files, but that’s just a
minor detail.

FindBugs

Take a look at FindBugs. They have a
Java bug-finder that found some things in Classpath; it is pretty
cool. I’d love it if this was being run on Classpath every night.
Maybe next time I hack my nightly build infrastructure…

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.