Skip to content

community/gcc-avr: Fix linking with C++ & optimize for size

Marian Buschsieweke requested to merge maribu/aports:community/gcc-avr into master

Fully standard compliant support for C++ global deconstructors require the use of _cxa_atexit rather than atexit for registration, which is not available on bare metal embedded systems. So let's disable this to prevent linking issues.

Note that global deconstructors on microcontrollers that run a firmware rather than user space programs - so where no sensible "program exit" event exits - make little sense anyway.

In addition, this brings the C{,XX}FLAGS_FOR_TARGET back in sync with gcc-cross-embedded to optimize for size.

Merge request reports