From patchwork Thu Mar 29 01:15:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 149347 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]) by ozlabs.org (Postfix) with SMTP id DBF23B6F9F for ; Thu, 29 Mar 2012 12:15:49 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1333588550; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=qpf+0qToDRwHP/i1ItGF G8nzk5Y=; b=G4RzdoDzEeIqdcNBPIbxvVlnp/357VvnWH/HDIrU8Lx5F8dZoPOX GAJtG9/zi9Oc9OowNqdu13/gxFVUgrkXe3z2/UDNCWjBKhIZVZL63nimyji3g2F8 C6LI/whAHqOO2njLv/Tj6Vjm2Us1w/uZ19nUzHioCkKi/P+Q0kttDZ4= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-ExtLoop1:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=iKtxIPT8lj8tH0T+KEMTM7vXSyWG+hjlXsTZii1tHktd7Bl1t6KXK+bxxaOGt7 Sww8g7fwxHhp6Jm9z63TlnV6B9whorR1YKABWJLP3DNVOnGrhmG6YOQEUb0X/R19 f/JwIHD8424RpRi7T0oh1/FwGo7PpoVNahlHlbBkW1xYI=; Received: (qmail 28122 invoked by alias); 29 Mar 2012 01:15:46 -0000 Received: (qmail 28110 invoked by uid 22791); 29 Mar 2012 01:15:45 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Mar 2012 01:15:32 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 28 Mar 2012 18:15:31 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2012 18:15:31 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 7F5DBC20B9; Wed, 28 Mar 2012 18:15:31 -0700 (PDT) Date: Wed, 28 Mar 2012 18:15:31 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: ian@airs.com Subject: PATCH: Define x86_64_fallback_frame_state only for glibc Message-ID: <20120329011531.GA19153@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 Hi, We shouldn't assume that we can define x86_64_fallback_frame_state for other x86-64 C libraries, like Bionic. OK for trunk? Thanks. H.J. --- 2012-03-27 H.J. Lu * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Define only for glibc. diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h index c5f7ea0..61b4ebf 100644 --- a/libgcc/config/i386/linux-unwind.h +++ b/libgcc/config/i386/linux-unwind.h @@ -28,11 +28,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef inhibit_libc -#ifdef __x86_64__ +/* There's no sys/ucontext.h for glibc 2.0, so no + signal-turned-exceptions for them. There's also no configure-run for + the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the + target libc version macro should be enough. */ +#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) #include #include +#ifdef __x86_64__ + #define MD_FALLBACK_FRAME_STATE_FOR x86_64_fallback_frame_state static _Unwind_Reason_Code @@ -102,15 +108,6 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context, #else /* ifdef __x86_64__ */ -/* There's no sys/ucontext.h for glibc 2.0, so no - signal-turned-exceptions for them. There's also no configure-run for - the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the - target libc version macro should be enough. */ -#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) - -#include -#include - #define MD_FALLBACK_FRAME_STATE_FOR x86_fallback_frame_state static _Unwind_Reason_Code @@ -191,6 +188,6 @@ x86_frob_update_context (struct _Unwind_Context *context, _Unwind_SetSignalFrame (context, 1); } -#endif /* not glibc 2.0 */ #endif /* ifdef __x86_64__ */ +#endif /* not glibc 2.0 */ #endif /* ifdef inhibit_libc */