Fix for a problem in linking vs. Boost.Thread we are seeing on s390

This commit is contained in:
Petr Machata 2013-08-24 01:01:19 +02:00
parent 0f7ace626f
commit f99fe16ac3
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,51 @@
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
--- boost_1_54_0/libs/thread/build/has_atomic_flag_lockfree_test.cpp 1970-01-01 01:00:00.000000000 +0100
+++ boost_1_54_0.pm/libs/thread/build/has_atomic_flag_lockfree_test.cpp 2013-08-23 19:51:52.706329968 +0200
@@ -0,0 +1,14 @@
+// Copyright (c) 2013, Petr Machata, Red Hat Inc.
+//
+// Use modification and distribution are subject to the boost Software
+// License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
+
+#include "../../../boost/atomic.hpp"
+#include "../../../boost/static_assert.hpp"
+
+int
+main(int argc, char *argv[])
+{
+ BOOST_STATIC_ASSERT(BOOST_ATOMIC_FLAG_LOCK_FREE);
+ return 0;
+}
diff -Nurp boost_1_54_0/libs/thread/build/Jamfile.v2 boost_1_54_0.pm/libs/thread/build/Jamfile.v2
--- boost_1_54_0/libs/thread/build/Jamfile.v2 2013-06-15 12:35:45.000000000 +0200
+++ boost_1_54_0.pm/libs/thread/build/Jamfile.v2 2013-08-23 19:52:30.018613408 +0200
@@ -36,6 +36,7 @@ import os ;
import feature ;
import indirect ;
import path ;
+import configure ;
project boost/thread
: source-location ../src
@@ -140,6 +141,8 @@ local rule default_threadapi ( )
feature.feature threadapi : pthread win32 : propagated ;
feature.set-default threadapi : [ default_threadapi ] ;
+exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ;
+
rule tag ( name : type ? : property-set )
{
local result = $(name) ;
@@ -248,6 +251,12 @@ rule requirements ( properties * )
{
local result ;
+ if ! [ configure.builds has_atomic_flag_lockfree
+ : $(properties) : "lockfree boost::atomic_flag" ]
+ {
+ result += <library>/boost/atomic//boost_atomic ;
+ }
+
if <threadapi>pthread in $(properties)
{
result += <define>BOOST_THREAD_POSIX ;

View File

@ -190,6 +190,9 @@ Patch52: boost-1.54.0-thread-cond_variable_shadow.patch
# This was already fixed upstream, so no tracking bug.
Patch53: boost-1.54.0-pool-max_chunks_shadow.patch
# https://svn.boost.org/trac/boost/ticket/9041
Patch54: boost-1.54.0-thread-link_atomic.patch
%bcond_with tests
%bcond_with docs_generated
@ -678,6 +681,7 @@ a number of significant features and is now developed independently
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
# At least python2_version needs to be a macro so that it's visible in
# %%install as well.
@ -1263,8 +1267,10 @@ rm -rf $RPM_BUILD_ROOT
(boost-1.54.0-pool-test_linking.patch)
- Fix -Wshadow warnings in Boost.Pool
(boost-1.54.0-pool-max_chunks_shadow.patch)
-Wshadow warnings in Boost.Thread
- -Wshadow warnings in Boost.Thread
(boost-1.54.0-thread-cond_variable_shadow.patch)
- libboost_thread.so.* lacks DT_NEEDED on libboost_atomic.so.* on
s390. (boost-1.54.0-thread-link_atomic.patch)
* Mon Aug 19 2013 Petr Machata <pmachata@redhat.com> - 1.54.0-3
- Bump odeint obsoletes and provides a notch to cover a build that