Subject: [Boost-bugs] [Boost C++ Libraries] #2525: More architectures that do not support __sync_fetch_and_add_4
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-22 11:30:06
#2525: More architectures that do not support __sync_fetch_and_add_4
---------------------------------------------+------------------------------
Reporter: Steven Robbins <smr_at_[hidden]> | Owner: pdimov
Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: smart_ptr
Version: Boost 1.37.0 | Severity: Problem
Keywords: |
---------------------------------------------+------------------------------
Hi,
As noted in #2263, Boost makes the incorrect assumption that if the
following condition is true:
defined( GNUC ) && ( GNUC * 100 + GNUC_MINOR >= 401 )
then GCC sync primitives (e.g. sync_lock_test_and_set, sync_fetch_and_add)
are available.
Currently, hppa and arm are listed as exceptions. However, building Boost
on Debian's 14 architectures suggests that some more exceptions are
needed: __armel__ (ARM in little endian mode), __m68k__ and __sparc__.
I'm attaching a patch to atomic_count.hpp to this effect.
When using GNU C++ however, that patch means that all those machines fall
through to atomic_count_gcc.hpp, which is known to be broken for GCC > 4.1
(c.f. #1084, never applied). I'm attaching a patch for this problem, too.
Note that these patches are only for the problems I noticed while building
Boost, and only because we also build "tools/bcp", which happens to use
shared_ptr. From grepping the sources it appears that there are a few
others.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2525> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC