Commit 0e31043
committed
gcc: let libstdc++ use newlib's __cxa_thread_atexit on the Vita target
libstdc++ only defers thread_local destructor registration to libc when
HAVE___CXA_THREAD_ATEXIT is defined at its configure time, and the
--with-newlib branch never checks for the symbol: it hardcodes its
feature list. Without the define, libsupc++ compiles its own fallback,
which keeps the destructor list in a pthread key, only runs it when the
prebuilt library sees gthreads as active (a weak pthread_cancel
reference, satisfied only by a whole-archive libpthread), and never on a
raw kernel thread. Newlib on Vita now provides __cxa_thread_atexit,
running the destructors from the thread-exit path on every exit path, so
define it for arm-vita-eabi in that branch. Patched in both configure.ac
and the generated configure, since the build does not regenerate it.
Assisted-by: Claude Fable 51 parent 489488b commit 0e31043
2 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments