From patchwork Sat Jul 9 23:14:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 104039 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 6BBC4B6FD1 for ; Sun, 10 Jul 2011 09:14:45 +1000 (EST) Received: (qmail 4130 invoked by alias); 9 Jul 2011 23:14:44 -0000 Received: (qmail 4121 invoked by uid 22791); 9 Jul 2011 23:14:43 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Jul 2011 23:14:28 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id 3801811F98 for ; Sun, 10 Jul 2011 01:14:27 +0200 (CEST) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NqXBap9h+8yR for ; Sun, 10 Jul 2011 01:14:26 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by ra.se.axis.com (Postfix) with ESMTP id 7A00B11F97 for ; Sun, 10 Jul 2011 01:14:26 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id 758FD340BB; Sun, 10 Jul 2011 01:14:26 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id p69NEQF6005822; Sun, 10 Jul 2011 01:14:26 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id p69NEQ8Q005818; Sun, 10 Jul 2011 01:14:26 +0200 Date: Sun, 10 Jul 2011 01:14:26 +0200 Message-Id: <201107092314.p69NEQ8Q005818@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gcc-patches@gcc.gnu.org Subject: Committed, cris-elf: Don't compile crtstuff.c with debug info 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 The $(LIBGCC2_CFLAGS) removed in the patch is prehistoric (before first commit in the FSF repo) but was once needed or at least seemed like a good idea; I can't recall which. These days, its major effect is to add "-g", which with the recent dwarf2 changes is lethal, if you're unlucky. With the default CRT_CALL_STATIC_FUNCTION it might add, in a dwarf2 frame info debug section: .byte 0x4 ;# DW_CFA_advance_loc4 .dword .LCFI4-.LCFI3 where .LCFI4 and .LCFI3 are in different sections due to the switching-sections-with-asm hack. That kind of expression is not supported. There have to be a few unlucky circumstances: the assembler has to not support CFI directives (the gcc configure-test failing) and the stack frame for void call_foo(void) { asm(".section .init"); foo(); asm(".text"); } has to be non-empty; call_foo has to explicitly store its return-address (as with call insns in RISC ISAs). Committed after testing that it works as good as defining CRT_CALL_STATIC_FUNCTION, which would be needed in several flavors due to PIC and ISA variation. PR target/49684 * config/cris/t-elfmulti (CRTSTUFF_T_CFLAGS): Don't include $(LIBGCC2_CFLAGS). brgds, H-P Index: config/cris/t-elfmulti =================================================================== --- config/cris/t-elfmulti (revision 175272) +++ config/cris/t-elfmulti (working copy) @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 2007, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -31,4 +31,4 @@ MULTILIB_MATCHES = \ MULTILIB_EXTRA_OPTS = mbest-lib-options INSTALL_LIBGCC = install-multilib LIBGCC = stmp-multilib -CRTSTUFF_T_CFLAGS = $(LIBGCC2_CFLAGS) -moverride-best-lib-options +CRTSTUFF_T_CFLAGS = -moverride-best-lib-options