Ticket #9041: boost-1.54.0-thread-link_atomic.patch

File boost-1.54.0-thread-link_atomic.patch, 1.8 KB (added by Petr Machata <pmachata@…>, 9 years ago)

A fix.

  • libs/thread/build/has_atomic_flag_lockfree_test.cpp

    diff -Nurp boost_1_54_0/libs/thread/build/has_atomic_flag_lockfree_test.cpp boost_1_54_0.pm/libs/thread/build/has_atomic_flag_lockfree_test.cpp
    old new  
     1// Copyright (c) 2013, Petr Machata, Red Hat Inc.
     2//
     3// Use modification and distribution are subject to the boost Software
     4// License, Version 1.0.  (See http://www.boost.org/LICENSE_1_0.txt).
     5
     6#include "../../../boost/atomic.hpp"
     7#include "../../../boost/static_assert.hpp"
     8
     9int
     10main(int argc, char *argv[])
     11{
     12  BOOST_STATIC_ASSERT(BOOST_ATOMIC_FLAG_LOCK_FREE);
     13  return 0;
     14}
  • libs/thread/build/Jamfile.v2

    diff -Nurp boost_1_54_0/libs/thread/build/Jamfile.v2 boost_1_54_0.pm/libs/thread/build/Jamfile.v2
    old new import os ;  
    3636import feature ;
    3737import indirect ;
    3838import path ;
     39import configure ;
    3940
    4041project boost/thread
    4142    : source-location ../src
    local rule default_threadapi ( )  
    140141feature.feature threadapi : pthread win32 : propagated ;
    141142feature.set-default threadapi : [ default_threadapi ] ;
    142143
     144exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ;
     145
    143146rule tag ( name : type ? : property-set )
    144147{
    145148    local result = $(name) ;
    rule requirements ( properties * )  
    248251{
    249252    local result ;
    250253
     254    if ! [ configure.builds has_atomic_flag_lockfree
     255           : $(properties) : "lockfree boost::atomic_flag" ]
     256    {
     257        result += <library>/boost/atomic//boost_atomic ;
     258    }
     259
    251260    if <threadapi>pthread in $(properties)
    252261    {
    253262        result += <define>BOOST_THREAD_POSIX ;