summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndré Draszik <git@andred.net>2016-09-19 11:26:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-20 15:11:08 +0100
commit506df09b702f82f3bada4d39f57e638394c857f6 (patch)
tree59a30d79a856b944b100f1314b876bfca31698c1 /meta
parentd8af0f283ae9d3284f1c51f68ba171473192b49a (diff)
downloadpoky-506df09b702f82f3bada4d39f57e638394c857f6.tar.gz
boost: switch to using C++11 atomics when available
The alleviates the need to use and maintain hand-written assembly, just relying on the compiler to do the right thing. (From OE-Core rev: 0e683664dfbe2b71288445a86e31fbea062ed564) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch59
-rw-r--r--meta/recipes-support/boost/boost_1.61.0.bb1
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
new file mode 100644
index 0000000000..ab7826ba26
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
@@ -0,0 +1,59 @@
1From c234cc557f60729e071d6da59747c1a9289555c5 Mon Sep 17 00:00:00 2001
2From: Peter Dimov <pdimov@pdimov.com>
3Date: Sun, 28 Aug 2016 21:28:21 +0300
4Subject: [PATCH 4/4] Use <atomic> by default when BOOST_NO_CXX11_HDR_ATOMIC is
5 not defined
6
7---
8Upstream-Status: Backport [https://github.com/boostorg/smart_ptr/commit/20fedcff2ca3143503ec4e876d47745ab0ec7b0c]
9Signed-off-by: André Draszik <git@andred.net>
10 boost/smart_ptr/detail/atomic_count.hpp | 3 +++
11 boost/smart_ptr/detail/sp_counted_base.hpp | 3 +++
12 boost/smart_ptr/detail/spinlock.hpp | 3 +++
13 3 files changed, 9 insertions(+)
14
15diff --git a/boost/smart_ptr/detail/atomic_count.hpp b/boost/smart_ptr/detail/atomic_count.hpp
16index 8aefd44..6e4f71a 100644
17--- a/boost/smart_ptr/detail/atomic_count.hpp
18+++ b/boost/smart_ptr/detail/atomic_count.hpp
19@@ -73,6 +73,9 @@
20 #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
21 # include <boost/smart_ptr/detail/atomic_count_nt.hpp>
22
23+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
24+# include <boost/smart_ptr/detail/atomic_count_std_atomic.hpp>
25+
26 #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined( __PATHSCALE__ )
27 # include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp>
28
29diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
30index 0995ca8..83ede23 100644
31--- a/boost/smart_ptr/detail/sp_counted_base.hpp
32+++ b/boost/smart_ptr/detail/sp_counted_base.hpp
33@@ -44,6 +44,9 @@
34 #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
35 # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
36
37+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
38+# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp>
39+
40 #elif defined( __SNC__ )
41 # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
42
43diff --git a/boost/smart_ptr/detail/spinlock.hpp b/boost/smart_ptr/detail/spinlock.hpp
44index 19f93d7..0b618df 100644
45--- a/boost/smart_ptr/detail/spinlock.hpp
46+++ b/boost/smart_ptr/detail/spinlock.hpp
47@@ -43,6 +43,9 @@
48 #elif defined( BOOST_SP_USE_PTHREADS )
49 # include <boost/smart_ptr/detail/spinlock_pt.hpp>
50
51+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
52+# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
53+
54 #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
55 # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
56
57--
582.9.3
59
diff --git a/meta/recipes-support/boost/boost_1.61.0.bb b/meta/recipes-support/boost/boost_1.61.0.bb
index 6926e84d50..33f209c9be 100644
--- a/meta/recipes-support/boost/boost_1.61.0.bb
+++ b/meta/recipes-support/boost/boost_1.61.0.bb
@@ -8,4 +8,5 @@ SRC_URI += "\
8 file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \ 8 file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \
9 file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \ 9 file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \
10 file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \ 10 file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \
11 file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \
11" 12"