From 04ffdd792f53a00effc21e60bb90666e899f1784 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 28 Aug 2018 22:10:56 -0700 Subject: boost: Fix invalid const in atomic builtins Fixes build with clang Signed-off-by: Khem Raj --- ...Fix-invalid-const-atomic-builtin-accesses.patch | 44 ++++++++++++++++++++++ meta/recipes-support/boost/boost_1.67.0.bb | 15 ++++---- 2 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-support/boost/boost/0001-Fix-invalid-const-atomic-builtin-accesses.patch (limited to 'meta/recipes-support') 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 +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 +--- + 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 \ + " -- cgit 1.2.3-korg