This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH, libgcc] Disable JCR section when java is not enabled
- From: "Joey Ye" <joey dot ye at arm dot com>
- To: "'Jakub Jelinek'" <jakub at redhat dot com>
- Cc: <per at bothner dot com>, <aph at redhat dot com>, "Tom Tromey" <tromey at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches" <gcc-patches at gcc dot gnu dot org>, "'Ian Lance Taylor'" <iant at google dot com>
- Date: Sat, 12 Oct 2013 14:07:42 +0800
- Subject: RE: [PATCH, libgcc] Disable JCR section when java is not enabled
- Authentication-results: sourceware.org; auth=none
- References: <000901ceae04$546ced10$fd46c730$ at arm dot com> <CAKOQZ8y9OWS51mySrr4PC8dvAfy2Zu_H3hGjMaE3cxGVM+dMNQ at mail dot gmail dot com> <000601cec591$ebca0c20$c35e2460$ at arm dot com> <20131010084804 dot GA30970 at tucnak dot zalov dot cz>
> -----Original Message-----
> From: Jakub Jelinek [mailto:jakub@redhat.com]
> Sent: Thursday, October 10, 2013 16:48
> To: Joey Ye
> Cc: per@bothner.com; aph@redhat.com; Tom Tromey; H.J. Lu; gcc-patches;
> 'Ian Lance Taylor'
> Subject: Re: [PATCH, libgcc] Disable JCR section when java is not enabled
>
> On Thu, Oct 10, 2013 at 04:22:52PM +0800, Joey Ye wrote:
> > Dear Java maintainers, are you OK with this patch?
>
> Given the state of gcj that it is now only rarely used and most people
just use
> OpenJDK instead, wouldn't it be a good idea to just require that gcj code
is
> linked using gcj driver or, if linked in any other driver, just using a
special non-
> default option (-flink-jcr or similar), that would be automatically set by
gcj
> driver, move this JCR stuff out of the normal
> crt* files and put it into crtjava*.o instead, and only link in if
-flink-jcr is
> passed or gcj driver used? Or treat -lgcj as that magic switch?
>
> Or, alternatively, at least for selected targets, live with the extra 8
bytes
> in .jcr section for every binary/shared library, but move the
> _Jv_RegisterClasses call into libgcj_nonshared.a and libgcj.a and make
> libgcj.so be a linker script containing both libgcj_nonshared.a and
libgcj.so.*.
8 bytes of RAM is precious for embedded system. As Tom pointed out that a
complete solution need significantly more work, I'd prefer to enable this
simple fix.
OK for trunk?
Thanks,
Joey