aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-28 22:10:56 -0700
committerKhem Raj <raj.khem@gmail.com>2018-08-28 22:11:58 -0700
commit04ffdd792f53a00effc21e60bb90666e899f1784 (patch)
tree3511b1d4d5a952d99ccfdd85be273cbafdc728bd
parent62f7c23173a051958c2cf6e8d7a4fce9bd0ef279 (diff)
downloadopenembedded-core-contrib-kraj/pu.tar.gz
boost: Fix invalid const in atomic builtinskraj/pu
Fixes build with clang Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta/recipes-support/boost/boost/0001-Fix-invalid-const-atomic-builtin-accesses.patch44
-rw-r--r--meta/recipes-support/boost/boost_1.67.0.bb15
2 files changed, 52 insertions, 7 deletions
diff --git a/meta/recipes-support/boost/boost/0001-Fix-invalid-const-atomic-builtin-accesses.patch b/meta/recipes-support/boost/boost/0001-Fix-invalid-const-atomic-builtin-accesses.patch
new file mode 100644
index 0000000000..958df30e0d
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-Fix-invalid-const-atomic-builtin-accesses.patch
@@ -0,0 +1,44 @@
+From bc08c8be95e989ad3f428c8a5c494c9fc863aeb1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Aug 2018 21:39:59 -0700
+Subject: [PATCH] Fix invalid const atomic builtin accesses
+
+Clang fixed a signature issue with builtin atomic functions wrongly
+allowing const-qualified arguments. This change removes the invalid
+const qualifiers from those calls.
+
+Fixes:
+boost/atomic/detail/ops_gcc_x86_dcas.hpp:408:16: error: address argument
+to atomic builtin cannot be const-qualified ('const volatile
+boost::atomics::detail::gcc_dcas_x86_64::storage_type *' (aka 'const
+volatile unsigned __int128 *') invalid)
+ return __sync_val_compare_and_swap(&storage, value, value);
+
+Upstream-Status: Submitted [https://github.com/boostorg/atomic/pull/17]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ boost/atomic/detail/ops_gcc_x86_dcas.hpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/boost/atomic/detail/ops_gcc_x86_dcas.hpp b/boost/atomic/detail/ops_gcc_x86_dcas.hpp
+index 4dacc66fe2..12bf9ae818 100644
+--- a/boost/atomic/detail/ops_gcc_x86_dcas.hpp
++++ b/boost/atomic/detail/ops_gcc_x86_dcas.hpp
+@@ -119,7 +119,7 @@ struct gcc_dcas_x86
+ }
+ }
+
+- static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT
++ static BOOST_FORCEINLINE storage_type load(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT
+ {
+ storage_type value;
+
+@@ -399,7 +399,7 @@ struct gcc_dcas_x86_64
+ );
+ }
+
+- static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT
++ static BOOST_FORCEINLINE storage_type load(storage_type volatile& storage, memory_order) BOOST_NOEXCEPT
+ {
+ #if defined(__clang__)
+
diff --git a/meta/recipes-support/boost/boost_1.67.0.bb b/meta/recipes-support/boost/boost_1.67.0.bb
index 7bb451166c..98915887ce 100644
--- a/meta/recipes-support/boost/boost_1.67.0.bb
+++ b/meta/recipes-support/boost/boost_1.67.0.bb
@@ -2,10 +2,11 @@ require boost-${PV}.inc
require boost.inc
SRC_URI += "\
- file://arm-intrinsics.patch \
- file://boost-CVE-2012-2677.patch \
- file://boost-math-disable-pch-for-gcc.patch \
- file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
- file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
- file://0001-make_x86_64_sysv_elf_gas.S-set-.file-section.patch \
-"
+ file://arm-intrinsics.patch \
+ file://boost-CVE-2012-2677.patch \
+ file://boost-math-disable-pch-for-gcc.patch \
+ file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
+ file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
+ file://0001-make_x86_64_sysv_elf_gas.S-set-.file-section.patch \
+ file://0001-Fix-invalid-const-atomic-builtin-accesses.patch \
+ "