From patchwork Tue Aug 31 00:06:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 63145 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 79C6DB70FD for ; Tue, 31 Aug 2010 10:06:53 +1000 (EST) Received: (qmail 17060 invoked by alias); 31 Aug 2010 00:06:33 -0000 Received: (qmail 17029 invoked by uid 22791); 31 Aug 2010 00:06:24 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 00:06:16 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 30 Aug 2010 17:06:14 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by azsmga001.ch.intel.com with ESMTP; 30 Aug 2010 17:06:14 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 24A7622667; Mon, 30 Aug 2010 17:06:14 -0700 (PDT) Date: Mon, 30 Aug 2010 17:06:14 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak Subject: PATCH: Properly check glibc for x86_fallback_frame_state Message-ID: <20100831000613.GA28890@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) 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, x86_fallback_frame_state only works with glibc newer than glibc 2.0. !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) is true when __GLIBC__ isn't defined. This patch checks __GLIBC__. OK for trunk? Thanks. H.J. --- 2010-08-30 H.J. Lu * config/i386/linux-unwind.h (x86_fallback_frame_state): Properly check glibc. diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h index 36ee370..415f7a3 100644 --- a/gcc/config/i386/linux-unwind.h +++ b/gcc/config/i386/linux-unwind.h @@ -106,7 +106,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context, 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 !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) +#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) #include #include