
4 Apr
2008
4 Apr
'08
1:08 p.m.
Schrader, Glenn wrote:
With assistance on the boost-build list I've ascertained that the problem is that GCC doesn't support __sync_fetch_and_add and the other atomic built-ins on ARM.
Two workarounds are available: define BOOST_SP_DISABLE_THREADS to disable MT-safety for the reference count, or define BOOST_SP_USE_PTHREADS to use a pthread_mutex.
Another option would be to just supply the __sync_fetch_and_add_4 function that gcc is trying to link in. When gcc doesn't support the builtin it assumes that a function exists with that name. A snippet of ARM assembly to implement the atomic operation shouldn't be that difficult.
Are you volunteering to write such a "snippet"? - Volodya