[PATCH] Speedup gij/libjava loading on darwin
Andreas Tobler
toa@pop.agri.ch
Sat Aug 20 21:55:00 GMT 2005
Geoff Keating wrote:
>
> On 19/08/2005, at 11:48 PM, Andreas Tobler wrote:
>
>> Geoffrey Keating wrote:
>>
>>> Andrew Pinski <pinskia@physics.uc.edu> writes:
>>>
>>>> * Makefile.am (extra_ldflags_libjava): New variable to
>>>> substitute in.
>>>> (LIBLINK): Add extra_ldflags_libjava to it.
>>>> * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
>>>> "-Wl,-single_module".
>>>>
>>> This is OK.
>>>
>>
>> I'm not very happy with this patch. I already mentioned it to Andrew.
>> Here on tiger 10.4.2 the situation gets worse. See the figures below.
>> Would you agree to do this change only for darwin7*?
>>
>> Index: configure.ac
>> ===================================================================
>> RCS file: /cvs/gcc/gcc/libjava/configure.ac,v
>> retrieving revision 1.36
>> diff -u -r1.36 configure.ac
>> --- configure.ac 19 Aug 2005 05:14:11 -0000 1.36
>> +++ configure.ac 20 Aug 2005 06:45:40 -0000
>> @@ -670,7 +670,7 @@
>>
>> # extra LD Flags which are required for targets
>> case "${host}" in
>> - *-darwin*)
>> + *-darwin7*)
>> # on Darwin -single_module speeds up loading of the dynamic
>> libraries.
>> extra_ldflags_libjava=-Wl,-single_module
>> ;;
>>
>> Afaik, the dyld and co got rewritten in tiger and now we have a slow
>> down. Maybe ld needs a rewrite too?
>>
>>
>> Here the figures :)
>
>
> That's not supposed to happen! Yes, this was unexpected, let's go back
> to multi-module on darwin8+ at least until we can work out what the
> problem is.
This would be the mod I'd like to commit. Thanks to Andrew to catch all
darwins below 8 ;)
Ok for main ?
Andreas
2005-08-20 Andreas Tobler <a.tobler@schweiz.ch>
* configure.ac (extra_ldflags_libjava): Enable -single_module only for
darwin < 8.
* configure: Regenerate.
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.ac,v
retrieving revision 1.36
diff -u -r1.36 configure.ac
--- configure.ac 19 Aug 2005 05:14:11 -0000 1.36
+++ configure.ac 20 Aug 2005 21:50:13 -0000
@@ -670,7 +670,9 @@
# extra LD Flags which are required for targets
case "${host}" in
- *-darwin*)
+*-*-darwin[0-7].*)
+ # For now we have to disable it on darwin[8-9] because it slows down
+ # the linking phase. A possible bug in ld?
# on Darwin -single_module speeds up loading of the dynamic libraries.
extra_ldflags_libjava=-Wl,-single_module
;;
More information about the Java-patches
mailing list