This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joey Ye <joey dot ye at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Joseph Prostko <joe dot prostko at gmail dot com>
- Date: Mon, 17 Dec 2012 11:28:21 -0800
- Subject: Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c
- References: <50b4317e.044d420a.1632.ffffd2f7SMTPIN_ADDED_BROKEN@mx.google.com> <CAMe9rOrEO_H4x_CcSrvp-mbJOxPtg2FQ1Q+MnidTsA+mXJ_w7w@mail.gmail.com> <50ca9f88.676bb40a.3a71.ffffb7b2SMTPIN_ADDED_BROKEN@mx.google.com> <CAMe9rOqLEQuTwx5xsdg_oDq=KXk3hgQ10HnR0NXW8OY_kw6+5w@mail.gmail.com> <50cacddc.014b420a.1bb8.65abSMTPIN_ADDED_BROKEN@mx.google.com> <CAMe9rOqT5WqhSxXwPnhfMWUx_N=7bagz9di+Wde2f4k+m5nEhA@mail.gmail.com> <50ceeb26.26d5440a.4827.0ac9SMTPIN_ADDED_BROKEN@mx.google.com>
On Mon, Dec 17, 2012 at 1:50 AM, Joey Ye <joey.ye@arm.com> wrote:
>> Can't you do
>>
>> +# Disable jcr section if we're not building java
>> +case ,${enable_languages}, in
>> + *java*)
>> + use_jcr_section=1
>> + ;;
>> + *)
>> + use_jcr_section=0
>> + ;;
>> +esac
>>
>> in libgcc/configure.ac?
>>
>> BTW, checking *,java,* is wrong for
>>
>> --enable-languages=c,c++,java
> Oh yes, it works. I didn't expect top level configure expands
> --enable-languages=all to individual languages. Patch simplified.
>
> However, I noticed that patterns like "*,java,*)" are widely used in
> configure and they do work. Can you explain more why it is wrong?
Yes, "*,java,*)" works since java is always placed between c++
and lto.
> * 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.
--
H.J.