This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Mon, Dec 17, 2012 at 5:23 PM, Joseph Prostko <joe.prostko@gmail.com> wrote:
> On Mon, Dec 17, 2012 at 2:28 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Mon, Dec 17, 2012 at 1:50 AM, Joey Ye <joey.ye@arm.com> 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?
>

TARGET_USE_JCR_SECTION determines whether to use the JCR section
to register Java classes. We don't need to do anything for Java if Java
isn't enabled. The change can be as simple as

#ifndef JAVA_IS_ENABLED
#undef JCR_SECTION_NAME
#endif

in crtstuff.c.  Can you give it a try?


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]