From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52363 invoked by alias); 12 May 2015 20:26:03 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 52333 invoked by uid 89); 12 May 2015 20:26:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 3 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 May 2015 20:26:01 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4CKPvxx030728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 12 May 2015 16:25:57 -0400 Received: from localhost.localdomain (ovpn-113-21.phx2.redhat.com [10.3.113.21]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4CKPuqh004032; Tue, 12 May 2015 16:25:56 -0400 Message-ID: <555261D4.2030606@redhat.com> Date: Tue, 12 May 2015 20:26:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eric Botcazou , gcc-patches@gcc.gnu.org CC: libstdc++@gcc.gnu.org, java-patches@gcc.gnu.org Subject: Re: [patch] Clean up detection of SJLJ exceptions in target libraries References: <1440100.16fMh0Bpp2@polaris> In-Reply-To: <1440100.16fMh0Bpp2@polaris> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-q2/txt/msg00010.txt.bz2 On 05/12/2015 10:42 AM, Eric Botcazou wrote: > Hi, > > 6 target libraries in the tree detect whether they are being compiled by a > compiler configured for setjmp/longjmp exceptions: libada, libgcc, libgo, > libjava, libobjc and libstdc++. They can be divided into 3 categories: > 1) libada only checks the preprocessor macro __USING_SJLJ_EXCEPTIONS__, > 2) libgcc and libgo both check the preprocessor macro and implement a > configure check that defines another macro (LIBGCC_SJLJ_EXCEPTIONS and > LIBGO_SJLJ_EXCEPTIONS resp) so they'd better agree. > 3) libjava, libobjc and libstdc++ implement a configure check that defines a > macro (SJLJ_EXCEPTIONS, SJLJ_EXCEPTIONS and _GLIBCXX_SJLJ_EXCEPTIONS resp). > > The attached patch gets rid of the library-specific macros and replaces them > with __USING_SJLJ_EXCEPTIONS__. Moreover, it adds a config/sjlj.m4 fragment > that defines GCC_CHECK_SJLJ_EXCEPTIONS for libraries that need to detect the > exception model in the configure phase (libgcc and libjava only). > > Tested on x86_64-suse-linux with --enable-sjlj-exceptions. The results are > not clean (except for objc and obj-c++) but sufficient to see that exceptions > still work after the patch. OK for the mainline? > > > 2015-05-12 Eric Botcazou > > config/ > * sjlj.m4: New file. > > libgcc/ > * configure.ac: Include config/sjlj.m4. > Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. > * config.in: Regenerate. > * configure: Likewise. > * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. > > libgo/ > * configure.ac: Remove manual SJLJ check. > * config.h.in: Regenerate. > * configure: Likewise. > * runtime/go-unwind.c: Replace LIBGO_SJLJ_EXCEPTIONS by > __USING_SJLJ_EXCEPTIONS__. > > libjava/ > * configure.ac: Include config/sjlj.m4. > Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. > * include/config.h.in: Regenerate. > * configure: Likewise. > * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. > * stacktrace.cc: Likewise. > * include/default-signal.h: Likewise. > * sysdep/i386/backtrace.h: Likewise. > > libobjc/ > * configure.ac: Remove manual SJLJ check. > * config.h.in: Regenerate. > * configure: Likewise. > * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. > > libstdc++-v3/ > * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. > * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. > * config.h.in: Regenerate. > * configure: Likewise. > * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by > __USING_SJLJ_EXCEPTIONS__. > * libsupc++/eh_throw.cc: Likewise. > * libsupc++/eh_ptr.cc: Likewise. > * doc/html/manual/appendix_porting.html: Remove > GLIBCXX_ENABLE_SJLJ_EXCEPTIONS > * doc/xml/manual/build_hacking.xml: Likewise. > * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. > * doc/xml/manual/configure.xml: Likewise. Generally OK. However, please confirm with ian on the libgo bits just in case you're hitting something that's shared with golang. We could certainly consider cleaning up the targets (hppa). That'd be a fine follow-up :-) ISTM we ought to be moving away from the EH model being something we explicitly ask for via enable/disable options on the configure command line. I trust you'll keep an eye out for any fallout. jeff