[Boost-bugs] [Boost C++ Libraries] #2263: On PA-RISC with GCC 4.3.1, thread primitives are misdetected

Subject: [Boost-bugs] [Boost C++ Libraries] #2263: On PA-RISC with GCC 4.3.1, thread primitives are misdetected
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-27 09:42:09


#2263: On PA-RISC with GCC 4.3.1, thread primitives are misdetected
---------------------------------+------------------------------------------
 Reporter: river_at_[hidden] | Type: Bugs
   Status: new | Milestone: Boost 1.37.0
Component: None | Version: Boost 1.36.0
 Severity: Problem | Keywords:
---------------------------------+------------------------------------------
 In at least two places (boost/detail/spinlock.hpp and
 boost/detail/atomic_count.hpp), Boost assumes 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. This is not correct; GCC 4.3.1 on
 PA-RISC does not provide these operations. The following link error
 results:

 /usr/ccs/bin/ld: Unsatisfied symbols:
    __sync_add_and_fetch_4 (first referenced in main.o) (code)

 The test can be fixed like this:

 defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) &&
 !defined(__hppa)

 However, it seems like it would be more resiliant to list the platforms
 which do support these primitves (e.g. Itanium, i386...) rather than
 excepting specific platforms.

 (Tested on HP-UX 11.11 using HP GCC 4.3.1 on a PA-8200 CPU.)

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2263>
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:58 UTC