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: Fri, 14 Dec 2012 09:19:52 -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>
On Thu, Dec 13, 2012 at 10:56 PM, Joey Ye <Joey.Ye@arm.com> wrote:
>> -----Original Message-----
>> From: H.J. Lu [mailto:hjl.tools@gmail.com]
>> Sent: Friday, December 14, 2012 11:55
>> To: Joey Ye
>> Cc: gcc-patches@gcc.gnu.org; Joseph Prostko
>> Subject: Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c
>>
>> > 2012-12-12 Joey Ye <joey.ye@arm.com>
>> >
>> > * configure.ac (enable-jcr-section): New target_configargs.
>> > * configure: Regenerated.
>> > * 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.
>>
>> Why do we need a new configure option at toplevel?
>> Can't you check --enable-languages=.. in libgcc?
> Although --enable-languages=... is passed to sub-configure, it needs a whole
> bunch of code to process with consideration of --disable-languages and
> targets. These code doesn't exist in libgcc/configure, and I intend not to
> duplicate them.
>
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
--
H.J.