Boost logo

Boost Users :

Subject: Re: [Boost-users] Cross-Compile Boost for Embedded Linux
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-17 16:56:44


Vladimir Prus:

> Richard Ketcham wrote:
>
...

>> ../../../bin.v2/libs/thread/build/gcc-arm/debug/threading-multi/libboost_thread-gcc-mt-d-1_36.so.1.36.0:
>> undefined reference to `__sync_add_and_fetch_4'
>> collect2: ld returned 1 exit status
>>
>> The linking continues to fail with the same two errors.
>
> The second error is caused by shared_ptr using gcc atomic intrinsics that
> are not actually supported on ARM.

I think that in 1.36, __sync_add_and_fetch is only used by
detail::atomic_count, not shared_ptr. The fix in this case would be to add

  && !defined(__arm__)

to the line

  #elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )

in boost/detail/atomic_count.hpp.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net