Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-05-07 20:08:05


Peter Dimov wrote:
> Eric Niebler wrote:
>> Peter Dimov wrote:
>>> For GCC 4.1 and above, we need to switch atomic_count and
>>> sp_counted_base to
>>>
>>> http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html
>>>
>>> If someone can submit a patch for that I'll incorporate it,
>>> otherwise it will happen whenever I find the time to implement and
>>> test it myself.
>>
>> That's more than I have time for, but the attached patch at least
>> gets detail/atomic_count.hpp compiling again on gcc-4.3. OK to
>> commit?
>
> Negative. I (think I) fixed it the right way.

Looks like this change is causing a linker error on at least one platform.

http://tinyurl.com/2hccmr

/home/cae/boost-regression/CVS-HEAD/results/boost/bin.v2/libs/xpressive/test/test3.test/gcc-4.1.1_sunos_i86pc/debug/debug-symbols-off/link-static/test3.o:
In function `boost::detail::atomic_count::operator long() const':
test3.cpp:(.text._ZNK5boost6detail12atomic_countcvlEv[boost::detail::atomic_count::operator
long() const]+0x10): undefined reference to `__sync_fetch_and_add_4'
/home/cae/boost-regression/CVS-HEAD/results/boost/bin.v2/libs/xpressive/test/test3.test/gcc-4.1.1_sunos_i86pc/debug/debug-symbols-off/link-static/test3.o:
In function `boost::detail::atomic_count::operator--()':
test3.cpp:(.text._ZN5boost6detail12atomic_countmmEv[boost::detail::atomic_count::operator--()]+0x10):
undefined reference to `__sync_add_and_fetch_4'
collect2: ld returned 1 exit status

This is on gcc-4.1.1_sunos_i86pc.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk