https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77543
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Yes try -fno-exceptions . This is all documented already and 99% of folks who do embedded that don't want exceptions already use that flag. You might also want to disable rtti too.