On Thu, Dec 13, 2012 at 10:56 PM, Joey Ye <joey...@arm.com> wrote: >> -----Original Message----- >> From: H.J. Lu [mailto:hjl.to...@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...@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.