On Tue, 14 Jul 2020, Richard Biener wrote:

> > >  Arguably this might probably be called a deficiency in libgcc, however
> > > the objects are built with `-fexceptions -fnon-call-exceptions'
> >
> > I consider that broken.  It doesn't make any sense to build a lowlevel
> > runtime library like libgcc with exceptions.
> 
> Indeed - you only need to be able to unwind through those, so
> -fasynchronous-unwind-tables should be used.

 This is libgcc's default however, only overridden for a couple of ARM 
targets, for the very reason to avoid pulling in the unwinder, according 
to the associated comments.  This was added with commit fc6aa0a98a0c some 
3 months before commit b932f770f70d added `-fasynchronous-unwind-tables' 
as a supported compiler option, all back in 2001, so we've had it for 
quite a while now.

 The RISC-V target doesn't appear to produce any division overflow traps, 
which would necessarily have to be arranged by a software convention like 
with, say, the MIPS target, as the relevant hardware instructions do not 
trigger an exception under any conditions.

 By switching to `-fasynchronous-unwind-tables' the ARM override can also 
go presumably, right?

  Maciej

Reply via email to