Documentation says gcc-arm > 10.2.1 should work, but 12.2.rel1 fails to compile v5.2.0 with:
In file included from /Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/mutex:43,
from ../wiring/inc/spark_wiring_system.h:40,
from ../wiring/inc/spark_wiring.h:49,
from ./inc/application.h:42,
from ./inc/Particle.h:5,
from /Users/lars/Documents/Code/quicly/particle/firmware/main.cpp:28:
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h: In constructor 'std::__condvar::__condvar()':
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h:135:7: error: '__GTHREAD_COND_INIT_FUNCTION' was not declared in this scope
135 | __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h: In destructor 'std::__condvar::~__condvar()':
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h:141:45: error: '__gthread_cond_destroy' was not declared in this scope; did you mean '__gthread_mutex_destroy'?
141 | int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond);
| ^~~~~~~~~~~~~~~~~~~~~~
| __gthread_mutex_destroy
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h: In member function 'void std::__condvar::wait(std::mutex&)':
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h:155:11: error: '__gthread_cond_wait' was not declared in this scope; did you mean '__gthread_cond_t'?
155 | = __gthread_cond_wait(&_M_cond, __m.native_handle());
| ^~~~~~~~~~~~~~~~~~~
| __gthread_cond_t
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h: In member function 'void std::__condvar::notify_one()':
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h:177:45: error: '__gthread_cond_signal' was not declared in this scope; did you mean '__gthread_cond_t'?
177 | int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond);
| ^~~~~~~~~~~~~~~~~~~~~
| __gthread_cond_t
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h: In member function 'void std::__condvar::notify_all()':
/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/arm-none-eabi/include/c++/12.2.1/bits/std_mutex.h:184:45: error: '__gthread_cond_broadcast' was not declared in this scope; did you mean '__gthread_cond_timedwait'?
184 | int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| __gthread_cond_timedwait