This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: custom libgcj


Bryce McKinlay wrote:
> On Mon, Apr 20, 2009 at 12:41 PM, abhishek desai <abhi00@gmail.com> wrote:
> 
>> I want to customize libgcj compilation to include only the garbage
>> collector part and other required files for a simple java program to
>> compile and execute in native using gcj. Then I want to add my own
>> java files to libgcj. Is there some way this can be done? Which files
>> can I edit for this ?
> 
> This would certainly be a very useful feature. Unfortunately, there is
> no easy way to do it. You could edit Makefile.am files by hand to
> remove classes you don't want, but you're likely to get missing symbol
> errors at link time due to the way libgcj is compiled.

I agree.

I think the only way to do it is iterate.

1.  Link app statcially with libgcj and make sure it still works.

2.  Run app with -verbose:class to see what gets used.

3.  Remove stuff that isn't listed in -verbose:class.

4.  Fix link errors.

5.  If that isn't enough, start tracing through -verbose:class and edit
the library source to prune dependencies.

6.  Goto 4...

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]