]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
boost: Fix invalid const in atomic builtins kraj/pu
authorKhem Raj <raj.khem@gmail.com>
Wed, 29 Aug 2018 05:10:56 +0000 (22:10 -0700)
committerKhem Raj <raj.khem@gmail.com>
Wed, 29 Aug 2018 05:11:58 +0000 (22:11 -0700)
Fixes build with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-support/boost/boost/0001-Fix-invalid-const-atomic-builtin-accesses.patch [new file with mode: 0644]
meta/recipes-support/boost/boost_1.67.0.bb

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 (file)
index 0000000..958df30
--- /dev/null
@@ -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__)
index 7bb451166cf395f6526733883eeeaccc1f5f991f..98915887ce200cbd5a770fe0c0857c9d3bc50974 100644 (file)
@@ -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 \
+           "