On Mon, Dec 17, 2012 at 1:50 AM, Joey Ye <joey...@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.