[JAVA] Fix bootstrap failure on Tru64
Roger Sayle
roger@eyesopen.com
Thu Apr 22 06:07:00 GMT 2004
On Tue, 13 Apr 2004, Andrew Haley wrote:
> Roger Sayle writes:
> > The following patch fixes the current bootstrap failure building
> > libjava on alphaev67-dec-osf5.1. The problem is that the function
> > write_resource_constructor is directly calling the asm_out.constructor
> > target hook without checking have_ctors_dtors. On Tru64 (which uses
> > collect2), this target method is a null pointer, and so jc1 gets a
> > segmentation fault.
> >
> > The following fix restores bootstrap, using the same idiom as in the
> > almost identical code in emit_register_classes in class.c. However,
> > the libjava testsuite looks much worse than the last time I bootstrapped
> > this platform in February.
>
> This is wrong, IMO. It's fair enough to bring Tru64 back to
> bootstrap, but clearly until we find some other way to make it work,
> this port is broken.
Hi Andrew,
It looks like the libjava failures on Tru64 were caused by an unrelated
regression, and not introduced by the ctor changes fixed in my patch.
I've bootstrapped and regression tested my patch on alphaev67-dec-osf5.1
and the results this week, look much better than they did last week.
last build CVS+patch CVS+patch
20040205 20040411 20040420
expected passes 3147 1475 3174
unexpected failures 69 922 90
expected failures 14 8 14
untested testcases 95 949 97
These numbers show that my patch restores bootstrap on Tru64, with
libjava results again roughly were they were the last time I built a
clean mainline CVS on Tru64. It looks like the failures encountered
previously were some independent problem that has since been fixed.
Ok for mainline?
2004-04-12 Roger Sayle <roger@eyesopen.com>
* resource.c (write_resource_constructor): Guard call to possibly
NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
Index: resource.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/resource.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 resource.c
*** resource.c 26 Nov 2003 01:34:32 -0000 1.9
--- resource.c 13 Apr 2004 22:11:05 -0000
*************** write_resource_constructor (void)
*** 129,134 ****
--- 129,137 ----
to scan the object file to find its ctor/dtor routine. */
TREE_PUBLIC (init_decl) = ! targetm.have_ctors_dtors;
+ /* Suppress spurious warnings. */
+ TREE_USED (init_decl) = 1;
+
pushlevel (0);
make_decl_rtl (init_decl, NULL);
init_function_start (init_decl);
*************** write_resource_constructor (void)
*** 156,163 ****
flag_inline_functions = saved_flag;
}
current_function_decl = NULL_TREE;
! (* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0),
! DEFAULT_INIT_PRIORITY);
input_location = saved_loc;
}
--- 159,167 ----
flag_inline_functions = saved_flag;
}
current_function_decl = NULL_TREE;
! if (targetm.have_ctors_dtors)
! targetm.asm_out.constructor (XEXP (DECL_RTL (init_decl), 0),
! DEFAULT_INIT_PRIORITY);
input_location = saved_loc;
}
Roger
--
More information about the Java-patches
mailing list