undefined reference to __sync_fetch_and_add_4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undefined reference to __sync_fetch_and_add_4



I'm having trouble linking against the latest release of the Boost
library with ARM/GNU EABI toolchain.

Build works fine but attempting to link gives:
 /tmp/ccZozMNJ.o: In function `boost::detail::atomic_decrement(int*)':
 test-regex.cpp:(.text._ZN5boost6detail16atomic_decrementEPi[boost::detail::atomic_decrement(int*)]+0x18):
undefined reference to `__sync_fetch_and_add_4'

__sync_fetch_and_add is a gcc built-in on platforms where supported -
I think this includes x86.
I've tried building and linking with -mcpu=arm926ej-s -march=armv5te
but still obtain the same result.

Any pointers as to problem?
TIA,
--rob