Commit 6700da1
committed
Add -fno-use-cxa-atexit compiler option to reduce unused code
C++ requires that static object destructors are called when the
program terminates. Recent versions of GCC use __cxa_atexit to
register exit handlers which call these object destructors.
With the -fno-use-cxa-atexit command line option, GCC uses atexit
instead (same functionality, but only up to 32 exit handlers can
be registered).
Since the Arduino main process can not return, and calls to exit()
simply call an infinite loop - so all of this is completely
irrelevant. No exit handlers are ever called.
By removing the unused __cxa_atexit functionality we save a bit of
space.
See rogerclarkmelbourne/Arduino_STM32#556
Thanks @justinschoeman
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>1 parent e97d7bc commit 6700da1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments