This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch] PR/18549 [4.0 Regression] gcj no longer works on win32
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: Richard Henderson <rth at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>,java-patches <java-patches at gcc dot gnu dot org>
- Date: Sun, 12 Dec 2004 22:24:08 +1300
- Subject: Re: [Patch] PR/18549 [4.0 Regression] gcj no longer works on win32
- References: <20041212073721.12387.qmail@web50905.mail.yahoo.com><20041212084229.GC31990@redhat.com>
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
Richard Henderson wrote:
> On Sun, Dec 12, 2004 at 08:37:21PM +1300, Danny Smith wrote:
>> ! if (TARGET_USE_JCR_SECTION)
>> {
>> tree t;
>> named_section_flags (JCR_SECTION_NAME, SECTION_WRITE);
>
> Will fail to compile if JCR_SECTION_NAME is not set.
>
Right, then just change the condition, (leaving in the abort() ifndef
JCR_SECTION_NAME.)
Index: gcc/gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.218
diff -c -3 -p -r1.218 class.c
*** gcc/gcc/java/class.c 3 Dec 2004 18:01:59 -0000 1.218
--- gcc/gcc/java/class.c 12 Dec 2004 09:22:10 -0000
*************** emit_register_classes (tree *list_p)
*** 2419,2428 ****
if (registered_class == NULL)
return;
! /* ??? This isn't quite the correct test. We also have to know
! that the target is using gcc's crtbegin/crtend objects rather
! than the ones that come with the operating system. */
! if (SUPPORTS_WEAK && targetm.have_named_sections)
{
#ifdef JCR_SECTION_NAME
tree t;
--- 2419,2429 ----
if (registered_class == NULL)
return;
! /* TARGET_USE_JCR_SECTION defaults to 1 if SUPPORTS_WEAK and
! TARGET_ASM_NAMED_SECTION, else 0. Some targets meet those
conditions
! but lack suitable crtbegin/end objects or linker support. These
! targets can overide the default in tm.h to use the fallback
mechanism. */
! if (TARGET_USE_JCR_SECTION)
{
#ifdef JCR_SECTION_NAME
tree t;
*************** emit_register_classes (tree *list_p)
*** 2432,2437 ****
--- 2433,2440 ----
assemble_integer (XEXP (DECL_RTL (t), 0),
POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
#else
+ /* A target has defined TARGET_USE_JCR_SECTION, but doesn't have
a
+ JCR_SECTION_NAME. */
abort ();
#endif
}
Index: gcc/gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.218
>
> r~