Suggested fix for this issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60428
Did not get any response there, so seeing if this is a better forum for suggested changes.
We've been using this patch for years without any known issues. Regards, -- Pierre Ossman Software Development Cendio AB https://cendio.com Teknikringen 8 https://twitter.com/ThinLinc 583 30 Linköping https://facebook.com/ThinLinc Phone: +46-13-214600 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
diff -up gcc-5.1.0/libgcc/config/arm/t-bpabi.arm-c-unwind gcc-5.1.0/libgcc/config/arm/t-bpabi --- gcc-5.1.0/libgcc/config/arm/t-bpabi.arm-c-unwind 2012-08-17 17:06:06.000000000 +0200 +++ gcc-5.1.0/libgcc/config/arm/t-bpabi 2015-05-20 12:56:19.751653982 +0200 @@ -3,7 +3,8 @@ LIB1ASMFUNCS += _aeabi_lcmp _aeabi_ulcmp # Add the BPABI C functions. LIB2ADD += $(srcdir)/config/arm/bpabi.c \ - $(srcdir)/config/arm/unaligned-funcs.c + $(srcdir)/config/arm/unaligned-funcs.c \ + $(srcdir)/config/arm/unwind-arm-dummy.c LIB2ADD_ST += $(srcdir)/config/arm/fp16.c diff -up gcc-5.1.0/libgcc/config/arm/unwind-arm.c.arm-c-unwind gcc-5.1.0/libgcc/config/arm/unwind-arm.c --- gcc-5.1.0/libgcc/config/arm/unwind-arm.c.arm-c-unwind 2015-01-05 13:33:28.000000000 +0100 +++ gcc-5.1.0/libgcc/config/arm/unwind-arm.c 2015-05-20 12:54:39.617322792 +0200 @@ -144,11 +144,11 @@ restore_non_core_regs (phase1_vrs * vrs) /* ABI defined personality routines. */ extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr0 (_Unwind_State, - _Unwind_Control_Block *, _Unwind_Context *);// __attribute__((weak)); + _Unwind_Control_Block *, _Unwind_Context *); extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr1 (_Unwind_State, - _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); + _Unwind_Control_Block *, _Unwind_Context *); extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr2 (_Unwind_State, - _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); + _Unwind_Control_Block *, _Unwind_Context *); /* ABI defined routine to store a virtual register to memory. */ diff -up gcc-5.1.0/libgcc/config/arm/unwind-arm-dummy.c.arm-c-unwind gcc-5.1.0/libgcc/config/arm/unwind-arm-dummy.c --- gcc-5.1.0/libgcc/config/arm/unwind-arm-dummy.c.arm-c-unwind 2015-05-20 12:54:39.617322792 +0200 +++ gcc-5.1.0/libgcc/config/arm/unwind-arm-dummy.c 2015-05-20 12:54:39.617322792 +0200 @@ -0,0 +1,54 @@ +/* ARM EABI dummy unwinding routines. + Copyright 2014 Pierre Ossman for Cendio AB + + This file is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3, or (at your option) any + later version. + + This file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + +#include "unwind.h" + +extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr0 (_Unwind_State, + _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); +extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr1 (_Unwind_State, + _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); +extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr2 (_Unwind_State, + _Unwind_Control_Block *, _Unwind_Context *) __attribute__((weak)); + +_Unwind_Reason_Code +__aeabi_unwind_cpp_pr0 (_Unwind_State state, + _Unwind_Control_Block *ucbp, + _Unwind_Context *context) +{ + return _URC_FAILURE; +} + +_Unwind_Reason_Code +__aeabi_unwind_cpp_pr1 (_Unwind_State state, + _Unwind_Control_Block *ucbp, + _Unwind_Context *context) +{ + return _URC_FAILURE; +} + +_Unwind_Reason_Code +__aeabi_unwind_cpp_pr2 (_Unwind_State state, + _Unwind_Control_Block *ucbp, + _Unwind_Context *context) +{ + return _URC_FAILURE; +}