https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110066
--- Comment #15 from Aurelien Jarno <aurelien at aurel32 dot net> --- (In reply to Andrew Pinski from comment #14) > Created attachment 55614 [details] > patch for someone to test out > > The problem is the similar across many targets so I basically copied what > was done for another target. Thanks for the patch, unfortunately it doesn't work as is. However, as commit 3cd08f7168c196d7a481b9ed9f4289fd1f14eea8 enabled both -fno-asynchronous-unwind-tables and -fno-unwind-tables, I have tried to add -fno-unwind-tables to riscv/t-crtstuff and that works.