From patchwork Sat Oct 6 15:09:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix libbacktrace build failure on arm-linux Date: Sat, 06 Oct 2012 05:09:17 -0000 From: Matthias Klose X-Patchwork-Id: 189713 Message-Id: <5070499D.2060001@ubuntu.com> To: GCC Patches 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. * 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; }