From patchwork Tue Sep 10 09:01:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Ye X-Patchwork-Id: 273785 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 561FA2C0124 for ; Tue, 10 Sep 2013 19:01:56 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=akQvthAOIG/3Zo/5 uS01IV669uV23tSIerFd51edPuoxw6dzSVcYqeCY1P+bJe/swGJ4jwBR1Y3axZT0 NAwGpI/FL4ZrHMuzJp5cEgPHqPmNPabs7SSzlNYaLDWfdvJ9Tz3TqLbx1djqOW9T g3idY/JMiQJ+TYGvFVX/tsLtyXI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=K2BFfjEIoA704HLdKI+ctk fg7UM=; b=iOaTEiSkjGQQnZ5vmcdrwnJyxIAe8pKJ3nmzqN35VbHh3Qls8CX3Db MrD4/fpbKE7jv+RMNPUYZHKZ05Q5mIb0S3fHUvILxlWtEP0NqzKcFCCSvmwXNc2E tjGfaHcRwr73YFRg3emVZsWILd5kPy6WKOF8awalu0n/zvH83HDUE= Received: (qmail 27820 invoked by alias); 10 Sep 2013 09:01:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 27803 invoked by uid 89); 10 Sep 2013 09:01:46 -0000 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2013 09:01:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_NO, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 10 Sep 2013 10:01:42 +0100 Received: from E103005 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 10 Sep 2013 10:01:39 +0100 From: "Joey Ye" To: Cc: Subject: [PATCH, libgcc] Disable JCR section when java is not enabled Date: Tue, 10 Sep 2013 17:01:24 +0800 Message-ID: <000901ceae04$546ced10$fd46c730$@arm.com> MIME-Version: 1.0 X-MC-Unique: 113091010014201401 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. if test "${libgcc_cv_lib_sjlj_exceptions+set}" = set; then : 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; }