Dear Java maintainers, are you OK with this patch? - Joey
> -----Original Message----- > From: Ian Lance Taylor [mailto:i...@google.com] > Sent: Thursday, September 12, 2013 3:28 > To: Joey Ye > Cc: gcc-patches; H.J. Lu; p...@bothner.com; a...@redhat.com; Tom Tromey > Subject: Re: [PATCH, libgcc] Disable JCR section when java is not enabled > > On Tue, Sep 10, 2013 at 2:01 AM, Joey Ye <joey...@arm.com> wrote: > > Updated to http://gcc.gnu.org/ml/gcc-patches/2012-12/msg01097.html > > > > Build passes on arm-none-eabi and bootstrap passes on x86. > > > > OK to trunk? > > > > ChangeLog > > * libgcc/Makefile.in: Include JAVA_IS_ENABLED in CFLAGS. > > * libgcc/configure.ac (java_is_enabled): New variable. > > * libgcc/configure: Regenerated. > > * libgcc/crtstuff.c: Check JAVA_IS_ENABLED. > > > The ChangeLog entries should be in libgcc/ChangeLog, and they should not > have the libgcc/ prefix on the file names. Compare to the other entries in > that file. > > This patch is OK for libgcc. > > However, before committing it, I would like it to be approved by a Java > maintainer. I've CC'ed the Java maintainers on this message. > > Thanks. > > Ian > > > > > > Index: Makefile.in > > > ========================================================== > ========= > > --- Makefile.in (revision 194467) > > +++ Makefile.in (working copy) > > @@ -281,7 +281,8 @@ > > -finhibit-size-directive -fno-inline -fno-exceptions \ > > -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ > > -fno-stack-protector \ > > - $(INHIBIT_LIBC_CFLAGS) > > + $(INHIBIT_LIBC_CFLAGS) \ > > + -DJAVA_IS_ENABLED=@java_is_enabled@ > > > > # Extra flags to use when compiling crt{begin,end}.o. > > CRTSTUFF_T_CFLAGS = > > Index: configure.ac > > > ========================================================== > ========= > > --- configure.ac (revision 194467) > > +++ configure.ac (working copy) > > @@ -204,6 +204,17 @@ > > esac], > > [enable_sjlj_exceptions=auto]) > > > > +# Disable jcr section if we are not building java case > > +,${enable_languages}, in > > + *,java,*) > > + java_is_enabled=1 > > + ;; > > + *) > > + java_is_enabled=0 > > + ;; > > +esac > > +AC_SUBST(java_is_enabled) > > + > > AC_CACHE_CHECK([whether to use setjmp/longjmp exceptions], > > [libgcc_cv_lib_sjlj_exceptions], [AC_LANG_CONFTEST( > > Index: crtstuff.c > > > ========================================================== > ========= > > --- crtstuff.c (revision 194467) > > +++ crtstuff.c (working copy) > > @@ -145,6 +145,10 @@ > > # define USE_TM_CLONE_REGISTRY 1 > > #endif > > > > +#if !JAVA_IS_ENABLED > > +#undef JCR_SECTION_NAME > > +#endif > > + > > /* We do not want to add the weak attribute to the declarations of these > > routines in unwind-dw2-fde.h because that will cause the definition of > > these symbols to be weak as well. > > Index: configure > > > ========================================================== > ========= > > --- configure (revision 194467) > > +++ configure (working copy) > > @@ -566,6 +566,7 @@ > > set_use_emutls > > set_have_cc_tls > > vis_hide > > +java_is_enabled > > fixed_point > > enable_decimal_float > > decimal_float > > @@ -4191,6 +4192,17 @@ > > fi > > > > > > +# Disable jcr section if we are not building java case > > +,${enable_languages}, in > > + *,java,*) > > + java_is_enabled=1 > > + ;; > > + *) > > + java_is_enabled=0 > > + ;; > > +esac > > + > > + > > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use > > setjmp/longjmp exceptions" >&5 $as_echo_n "checking whether to use > > setjmp/longjmp exceptions... " >&6; } if test > > "${libgcc_cv_lib_sjlj_exceptions+set}" = set; then : > > > > > >