From patchwork Sat Aug 18 10:50:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 178444 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 4DF652C008B for ; Sat, 18 Aug 2012 20:51:29 +1000 (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=1345891890; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:CC:Subject:In-Reply-To:Message-ID: References:MIME-Version:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=hAodFsxXGdWZp6ol+HYs3Lq7YHw=; b=ltgwbjNAJi3RoPb h0g+F3/0CYAI2+M/EzUKjX8/XaAiVINlAy28Ju9NINMHnGl00Fkl8kQEENQJcMCm uCrMWf0FNF73qywB7ej85IqEMtdcy/H4PuxZDyWVOMpN5Gg2RT8QS0x2CfWCAp+h qcqmaj0TuEHGepK1QeDfmzyi6NfI= 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:Received:Received:Received:Date:From:To:CC:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rD+XD61dhRsVJFo57Ptb8xlVFQWcmvPcVehm48IIJj2Bwz/IuL9S9TiHhI74Rv Ft+VcrfvB7EDY/3XlwQa+c+VeRQz/Bsj0F3xDKE3Juybh5aBEXDPssC46PbdJV+q Jpw9p72h3JcaIfah02satLyW0UWdJrJakyBL0iFoLBMVY=; Received: (qmail 476 invoked by alias); 18 Aug 2012 10:51:25 -0000 Received: (qmail 466 invoked by uid 22791); 18 Aug 2012 10:51:24 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Aug 2012 10:50:55 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1T2gcH-0005TD-KK from joseph_myers@mentor.com ; Sat, 18 Aug 2012 03:50:53 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 18 Aug 2012 03:50:53 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Sat, 18 Aug 2012 11:50:51 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1T2gcE-0003PN-AD; Sat, 18 Aug 2012 10:50:50 +0000 Date: Sat, 18 Aug 2012 10:50:50 +0000 From: "Joseph S. Myers" To: Ian Lance Taylor CC: , Subject: Re: Always define USE_PT_GNU_EH_FRAME in crtstuff.c for glibc In-Reply-To: Message-ID: References: MIME-Version: 1.0 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 On Sat, 18 Aug 2012, Ian Lance Taylor wrote: > Looking at the #if just before this one, it looks like you've omitted > the checks for a version of glibc before 2.2.2. Also I'm not sure how > this will play out with uClibc: it seems like it might always turn on > USE_PT_GNU_EH_FRAME, which might or might not be OK. > > These would not be issues if you added && defined(inhibit_libc). Did > you consider that? Here is a version with the extra defined(inhibit_libc) test. It's passed the same tests as before on arm-none-linux-gnueabi and x86_64-unknown-linux-gnu. OK to commit? 2012-08-18 Joseph Myers * crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc even if inhibit_libc. Index: libgcc/crtstuff.c =================================================================== --- libgcc/crtstuff.c (revision 190491) +++ libgcc/crtstuff.c (working copy) @@ -1,7 +1,7 @@ /* Specialized bits of code needed to support construction and destruction of file-scope objects in C++ code. Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 - 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 + 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). @@ -113,6 +113,20 @@ # define USE_PT_GNU_EH_FRAME # endif #endif + +#if defined(OBJECT_FORMAT_ELF) \ + && !defined(OBJECT_FORMAT_FLAT) \ + && defined(HAVE_LD_EH_FRAME_HDR) \ + && !defined(CRTSTUFFT_O) \ + && defined(inhibit_libc) \ + && (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__)) +/* On systems using glibc, an inhibit_libc build of libgcc is only + part of a bootstrap process. Build the same crt*.o as would be + built with headers present, so that it is not necessary to build + glibc more than once for the bootstrap to converge. */ +# define USE_PT_GNU_EH_FRAME +#endif + #if defined(EH_FRAME_SECTION_NAME) && !defined(USE_PT_GNU_EH_FRAME) # define USE_EH_FRAME_REGISTRY #endif