Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c

2012-12-17 Thread Joseph Prostko
On Mon, Dec 17, 2012 at 2:28 PM, H.J. Lu  wrote:
> On Mon, Dec 17, 2012 at 1:50 AM, Joey Ye  wrote:

>>   * libgcc/Makefile.in: Include TARGET_USE_JCR_SECTION in CFLAGS.
>>   * libgcc/configure.ac (use_jcr_section): New variable.
>>   * libgcc/configure: Regenerated.
>>   * libgcc/crtstuff.c: Check TARGET_USE_JCR_SECTION.
>
>
> I would use JAVA_IS_ENABLED instead of TARGET_USE_JCR_SECTION.
> But it is only my personal preference.

I believe Joey did that to be consistent with the
TARGET_USE_JCR_SECTION macro used in gcc/defaults.h that can be turned
on or off for targets that specify it .  If JAVA_IS_ENABLED is used
instead, should TARGET_USE_JCR_SECTION be deprecated?

- joe


Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c

2012-11-26 Thread Joseph Prostko
On Mon, Nov 26, 2012 at 11:55 PM, H.J. Lu  wrote:
> On Mon, Nov 26, 2012 at 7:19 PM, Joey Ye  wrote:
>> Ping^2
>>
>>> -Original Message-
>>> From: Joey Ye
>>> Sent: Tuesday, November 20, 2012 10:09
>>> To: gcc-patches@gcc.gnu.org
>>> Cc: Joey Ye
>>> Subject: RE: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c

> Since we have --enable-languages=.., can't we disable
> JCR_SECTION section if java isn't enabled?

I suppose that is certainly another option.  My main goal is to not
have _Jv_RegisterClasses show up in crtbegin.o, as it simply isn't
needed or desired in the case of Haiku.  Right now we only enable C
and C++, and it simply makes no sense to have anything Java-related
show up in our crtbegin.o.

- joe


Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c

2012-11-26 Thread Joseph Prostko
On Mon, Nov 26, 2012 at 10:19 PM, Joey Ye  wrote:
> Ping^2
>
>> -Original Message-
>> From: Joey Ye
>> Sent: Tuesday, November 20, 2012 10:09
>> To: gcc-patches@gcc.gnu.org
>> Cc: Joey Ye
>> Subject: RE: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c
>>
>> Ping, as Joseph Prostko is saying that this patch shall solve the same
>> problem he's facing.

Indeed.  I am working on updating Haiku's GCC port to GCC 4.7.2, and
in the past we always ended up editing defaults.h to not define
JCR_SECTION_NAME as a way to get around this issue.  Basically, in
Haiku, we don't want _Jv_RegisterClasses to end up in crtbegin.o so we
patched things in what I consider an unsatisfactory manner.  I hope to
get Haiku's GCC changes upstreamed at some point, and I admit our
current fix wouldn't stand any chance at being upstreamed compared to
Joey's suggested fix.

- joe