On Apr 29, 2005, Jakub Jelinek <[EMAIL PROTECTED]> wrote: > 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. We had a patch that did exactly this at some point, but RTH said it broke GNU/Linux/alpha and never gave me the details on what the failure mode was, and I wasn't able to trigger the error myself. I still have the patch in my tree, and it does indeed save lots of cycles. -- Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Red Hat Compiler Engineer [EMAIL PROTECTED], gcc.gnu.org} Free Software Evangelist [EMAIL PROTECTED], gnu.org}