This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Pruning libgcj
=?iso-8859-1?Q?=D8yvind=5FHarboe?= writes:
> How can GCJ not to link with libgcj?
>
> I was toying with the idea of using something like jclassinfo from sourceforge to list all the
> class files required starting at --main and then compiling only those. I'm expecting that
> this should discover almost all the classes required for the build.
It won't.
The linker already only links in classes for which there is a direct
reference in your program or libgcj startup. If you use the command
-Wl,-Map,myprog.map command while building your program you'll see how
this works.
> libgcj seems to be precompiled and pulled inn during link-time,
No, only the parts that are referenced.
Andrew.