adding a directory on a branch

Ranjit Mathew rmathew@gmail.com
Fri Oct 8 10:26:00 GMT 2004


Tom Tromey wrote:

> What I'd like to do is make a new top-level directory, which would
> hold the compiler core.  The contents of gcc/java would be replaced by
> the tree-specific back end.  I think a top-level directory is best
> since it clearly separates the LGPL module from everything else [3].

It seems that the Ada guys just keep both of these bits (GNAT
and Gigi?) in the "gcc/ada" folder itself, though they both seem
to be licensed under the GPL unlike in your case.


> I'm not sure what to name this directory.  "libgcj" seems really
> confusing, given that the libjava directory makes a library named
> libgcj.  I've called my sourceforge project "gcjx" (x = experimental);
> in the absence of suggestions I will call it "gcjx".

"GING" for "GING Is Not GCJ"?
"GRAG" for "GCJ Rewritten As GRAG"?
"JAC4J" for "Just Another Compiler For Java"?


> [1] Got my first .s output recently.

Congratulations! IMHO, a great thing to have in under
a year of hacking in your spare time.


> [3] I hope this message inspires a simultaneous flame war about C++,
> licensing, and source tree layout.  Next up: how this front end
> relates to line-map.[ch] :-)

Allow me to sprinkle some fuel. ;-)

I have played with it a bit and I must say a few things:

1. IMHO, it is *considerably simpler* to hack at compared
to GCJ. It uses "normal" data structures and containers
instead of the otherwise ubiquitous TREEs and has a nice
and simple object-oriented design. This makes it possible
for even lesser mortals like yours truly to make useful
contributions in a much shorter time and with much less
effort. This is important for hobbyist hackers who hack
on GCJ(X) in their spare time.

2. Being a C++ program using the STL containers, it
compiles slowly with GCC and gets really bloated object
files and executables. I have seen this problem with
Qt and KDE too and I'm not sure what I can do about it.

I've seen:

http://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html

and I tried out the alternatives, but they did not
make a big difference to either compile times or the
bloat with GCJX. Perhaps I did not do it "properly".

Does anyone have any insights into this or suggestions?

3. Since this is a front end written in C++, it would
require funky modifications to the bootstrap process.
We can have it compiled by either the system C++ compiler
or the bootstrap compiler. Note that since "java"
in "--enable-languages" also needs "c++", we can probably
assume that g++ will always be built when building GCJX
and simplify this by requiring it to be built by the
newly produced C++ compiler. The stage2 g++ can build
GCJX in stage3 and the stage3 g++ can then build GCJX
in a new stage4.

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT gmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/



More information about the Gcc mailing list