From patchwork Sun Oct 7 10:01:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 189796 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 5CF3B2C00E1 for ; Sun, 7 Oct 2012 21:06:09 +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=1350209171; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=LHW83l+3MVrq2KOukmII hwnVbR0=; b=gt9Om4/HOtY6pWVjuFo+x1AFlAhNiHF52Pr5grDbtpPFyU8KkCzk gqk85irHVe1eJVyLd1q+1SsuFGM0Wo3Bezck6xqzWnpPWN0+8XnVOJ7Iq6K29HIV 5Ean43zUl9x3uYiR2oYfyYkNvsNcJ2amU1AHUi/NNEovaWUD2RhC/Rs= 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:X-Envelope-From:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=mTjlUAFw1TqObA7NEhdcqbsDsjs11AzgO5fOiLbHtXYNjwsumZxPbCMhmVblsU NaMB/1iGuBA/jzurFIQ0oIYWdcQ6L+aUhKRyM9ifC91oGRKkJozOq105Mdwa6xfa KxONfVED7yymZvrtcocMTObtwnwhTbizNgvejY4fD/hiY=; Received: (qmail 24744 invoked by alias); 7 Oct 2012 10:06:05 -0000 Received: (qmail 24732 invoked by uid 22791); 7 Oct 2012 10:06:05 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Oct 2012 10:05:59 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.210] (dslb-088-073-077-057.pools.arcor-ip.net [88.73.77.57]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id q97A5uAe030738; Sun, 7 Oct 2012 12:05:57 +0200 Message-ID: <50715316.50704@ubuntu.com> Date: Sun, 07 Oct 2012 12:01:58 +0200 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Ian Lance Taylor CC: GCC Patches Subject: Re: [patch] fix libbacktrace build failure on arm-linux References: <5070499D.2060001@ubuntu.com> In-Reply-To: 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 06.10.2012 22:46, Ian Lance Taylor wrote: > On Sat, Oct 6, 2012 at 8:09 AM, Matthias Klose wrote: >> current trunk fails to build on arm-linux with: >> >> In file included from ../../../../src/libbacktrace/backtrace.c:35:0: >> ../libgcc/unwind.h: In function '_Unwind_decode_typeinfo_ptr': >> ../libgcc/unwind.h:42:45: error: unused parameter 'base' [-Werror=unused-parameter] >> _Unwind_decode_typeinfo_ptr (_Unwind_Word base, _Unwind_Word ptr) >> ^ >> ../libgcc/unwind.h: In function '__gnu_unwind_24bit': >> ../libgcc/unwind.h:68:41: error: unused parameter 'context' >> [-Werror=unused-parameter] >> __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) >> ^ >> ../libgcc/unwind.h:68:54: error: unused parameter 'data' [-Werror=unused-parameter] >> __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) >> ^ >> ../libgcc/unwind.h:68:64: error: unused parameter 'compact' >> [-Werror=unused-parameter] >> __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) >> ^ >> cc1: all warnings being treated as errors >> make[8]: *** [backtrace.lo] Error 1 >> >> the immediate fix is to mark all arguments as unused, however I don't know if >> this function should be used by libbacktrace, if it returns _URC_FAILURE >> unconditionally. > > The function is not used by libbacktrace. It's an inline function > defined in the header file, and the warning is about the inline > function definition. That is, this is a libgcc bug, not a > libbacktrace bug, it just happens to show up when compiling > libbacktrace for ARM > > >> * config/arm/unwind-arm.h (__gnu_unwind_24bit): Mark parameters >> as unused. >> >> >> --- libgcc/config/arm/unwind-arm.h (revision 192162) >> +++ libgcc/config/arm/unwind-arm.h (working copy) >> @@ -64,8 +64,11 @@ >> return tmp; >> } >> >> +#define __unused __attribute__((unused)) >> + >> static inline _Unwind_Reason_Code >> - __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) >> + __gnu_unwind_24bit (_Unwind_Context * context __unused, _uw data __unused, >> + int compact __unused) >> { >> return _URC_FAILURE; >> } > > Don't #define __unused. Just write __attribute__ ((unused)) on the > parameters. Break the lines as needed. > > This is OK with that change. committed the following. the base parameter in _Unwind_decode_typeinfo_ptr is unused too. Matthias 2012-10-07 Matthias Klose * config/arm/unwind-arm.h (__gnu_unwind_24bit): Mark parameters as unused. (_Unwind_decode_typeinfo_ptr): Mark base as unused. Index: libgcc/config/arm/unwind-arm.h =================================================================== --- a/src/libgcc/config/arm/unwind-arm.h (revision 192162) +++ b/src/libgcc/config/arm/unwind-arm.h (working copy) @@ -39,7 +39,8 @@ #endif /* Decode an R_ARM_TARGET2 relocation. */ static inline _Unwind_Word - _Unwind_decode_typeinfo_ptr (_Unwind_Word base, _Unwind_Word ptr) + _Unwind_decode_typeinfo_ptr (_Unwind_Word base __attribute__ ((unused)), + _Unwind_Word ptr) { _Unwind_Word tmp; @@ -65,7 +66,9 @@ } static inline _Unwind_Reason_Code - __gnu_unwind_24bit (_Unwind_Context * context, _uw data, int compact) + __gnu_unwind_24bit (_Unwind_Context * context __attribute__ ((unused)), + _Unwind_Context *_uw data __attribute__ ((unused)), + int compact __attribute__ ((unused))) { return _URC_FAILURE; }