From patchwork Sat Mar 12 21:01:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 86557 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 C2629B6F7A for ; Sun, 13 Mar 2011 08:01:44 +1100 (EST) Received: (qmail 24958 invoked by alias); 12 Mar 2011 21:01:42 -0000 Received: (qmail 24946 invoked by uid 22791); 12 Mar 2011 21:01:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sat, 12 Mar 2011 21:01:07 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 627DAB005D; Sat, 12 Mar 2011 16:01:05 -0500 (EST) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id p2CL15F7015544; Sat, 12 Mar 2011 16:01:05 -0500 Date: Sat, 12 Mar 2011 16:01:05 -0500 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iains@gcc.gnu.org Subject: [PATCH] prune warn_compact_unwind warnings on darwin Message-ID: <20110312210105.GA15542@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 Xcode 4.0's linker now defaults on... -warn_compact_unwind When producing a final linked image, the linker processes the __eh_frame section and produces an __unwind_info section. Most FDE entries in the __eh_frame can be represented by a 32-bit value in the __unwind_info section. The option issues a warning for any function whose FDE cannot be expressed in the compact unwind format. regardless of whether -no_compact_unwind is passed to the linker. This results in many bogus excess error failures in the testsuite due to these bogus warnings of the form... ld: warning: could not create compact unwind for I::operator+(int =const&) const: dwarf uses DW_CFA_GNU_args_size The attached patch adds a regsub statement to prune.exp to suppress this testsuite noise on darwin when linking with Xcode 4.0. Tested on x86_64-apple-darwin10. Jack 2011-03-12 Jack Howarth libstdc++-v3/ * testsuite/lib/prune.exp: Prune "could not create compact unwind for" warnings. gcc/ * testsuite/lib/prune.exp: Ditto. Index: libstdc++-v3/testsuite/lib/prune.exp =================================================================== --- libstdc++-v3/testsuite/lib/prune.exp (revision 170906) +++ libstdc++-v3/testsuite/lib/prune.exp (working copy) @@ -55,6 +55,9 @@ proc libstdc++-dg-prune { system text } regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text + # Ignore harmless warnings from Xcode 4.0. + regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text + foreach p $additional_prunes { if { [string length $p] > 0 } { # Following regexp matches a complete line containing $p. Index: gcc/testsuite/lib/prune.exp =================================================================== --- gcc/testsuite/lib/prune.exp (revision 170906) +++ gcc/testsuite/lib/prune.exp (working copy) @@ -56,6 +56,9 @@ proc prune_gcc_output { text } { regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text + + # Ignore harmless warnings from Xcode 4.0. + regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text #send_user "After:$text\n"