From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5256 invoked by alias); 27 Nov 2012 04:56:00 -0000 Received: (qmail 5243 invoked by uid 22791); 27 Nov 2012 04:55:58 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qc0-f175.google.com (HELO mail-qc0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 04:55:52 +0000 Received: by mail-qc0-f175.google.com with SMTP id j3so9012016qcs.20 for ; Mon, 26 Nov 2012 20:55:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.132.65 with SMTP id os1mr16646339qeb.7.1353992150256; Mon, 26 Nov 2012 20:55:50 -0800 (PST) Received: by 10.49.12.210 with HTTP; Mon, 26 Nov 2012 20:55:50 -0800 (PST) In-Reply-To: <50b4317e.044d420a.1632.ffffd2f7SMTPIN_ADDED_BROKEN@mx.google.com> References: <50b4317e.044d420a.1632.ffffd2f7SMTPIN_ADDED_BROKEN@mx.google.com> Date: Tue, 27 Nov 2012 04:56:00 -0000 Message-ID: Subject: Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c From: "H.J. Lu" To: Joey Ye Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02159.txt.bz2 On Mon, Nov 26, 2012 at 7:19 PM, Joey Ye wrote: > Ping^2 > >> -----Original Message----- >> From: Joey Ye >> Sent: Tuesday, November 20, 2012 10:09 >> To: gcc-patches@gcc.gnu.org >> Cc: Joey Ye >> Subject: RE: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c >> >> Ping, as Joseph Prostko is saying that this patch shall solve the same >> problem he's facing. >> >> > -----Original Message----- >> > From: Joey Ye [mailto:joey.ye@arm.com] >> > Sent: Friday, September 21, 2012 15:42 >> > To: gcc-patches@gcc.gnu.org >> > Subject: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c >> > >> > Current crtstuff.c checks if JCR_SECTION_NAME is defined to decide >> > whether >> > do work for JCR. However, defaults.h always defines JCR_SECTION_NAME: >> > >> > #ifndef JCR_SECTION_NAME >> > #define JCR_SECTION_NAME ".jcr" >> > #endif >> > >> > So it is impossible to disable JCR related code in crtbegin.o, which >> > can >> > save some bytes for every applications that doesn't need java. >> > >> > This patch revise the check of JCR_SECTION_NAME to >> > TARGET_USE_JCR_SECTION. >> > By defining latter to zero disable JCR in crtstuff. This change >> doesn't >> > impact logic of any target given following defines in defaults.h: >> > >> > #ifndef TARGET_USE_JCR_SECTION >> > #ifdef JCR_SECTION_NAME >> > #define TARGET_USE_JCR_SECTION 1 >> > #else >> > #define TARGET_USE_JCR_SECTION 0 >> > #endif >> > #endif >> > >> > Again, this patch doesn't impact libgcc on any target, unless >> > TARGET_USE_JCR_SECTION is explicitly defined to 0 with make >> > CFLAGS_FOR_TARGET=-DTARGET_USE_JCR_SECTION=0. AIX defines >> > TARGET_USE_JCR_SECTION to 0, but it has no crtbegin/end stuff. So also >> > no impact. >> > >> > OK to trunk? >> > >> > 2012-09-21 Joey Ye >> > >> > * crtstuff.c: Check TARGET_USE_JCR_SECTION. >> > Since we have --enable-languages=.., can't we disable JCR_SECTION section if java isn't enabled? -- H.J.