On Fri, Apr 29, 2005 at 10:47:06AM +0100, Andrew Haley wrote:
> Ian Lance Taylor writes:
>  > 
>  > And, yes, we clearly need to do something about the libjava build.
> 
> OK, I know nothing about libtool so this might not be possible, but
> IMO the easiest way of making a dramatic difference is to cease to
> compile every file twice, once with PIC and once without.  There would
> be a small performance regression for statically linked Java apps, but
> in practice Java is very hard to use with static linkage.

Definitely.  For -static you either have the choice of linking the
binary with -Wl,--whole-archive for libgcj.a (and likely other Java libs),
or spend a lot of time adding more and more objects that are really
needed, but linker doesn't pick them up.

For the distribution, we simply remove all Java *.a libraries, but it would
be a build time win if we don't have to compile them altogether.

        Jakub

Reply via email to