]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
boost: Compile out stdlib unary/binary_functions for c++11 and newer
authorKhem Raj <raj.khem@gmail.com>
Tue, 16 Aug 2022 16:58:51 +0000 (09:58 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Aug 2022 18:57:28 +0000 (19:57 +0100)
These base classes are deprecated/removed from libcpp15

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/boost/boost/0001-The-std-lib-unary-binary_function-base-classes-are-d.patch [new file with mode: 0644]
meta/recipes-support/boost/boost_1.79.0.bb

diff --git a/meta/recipes-support/boost/boost/0001-The-std-lib-unary-binary_function-base-classes-are-d.patch b/meta/recipes-support/boost/boost/0001-The-std-lib-unary-binary_function-base-classes-are-d.patch
new file mode 100644 (file)
index 0000000..4960334
--- /dev/null
@@ -0,0 +1,34 @@
+From f9b55f5a1fab85bf73c95e6372779d6f50f75e84 Mon Sep 17 00:00:00 2001
+From: jzmaddock <john@johnmaddock.co.uk>
+Date: Mon, 11 Jul 2022 18:26:07 +0100
+Subject: [PATCH] The std lib unary/binary_function base classes are
+ deprecated/removed from libcpp15. Fixes
+ https://github.com/boostorg/container_hash/issues/24.
+
+Upstream-Status: Backport [https://github.com/boostorg/config/pull/440/commits/f0af4a9184457939b89110795ae2d293582c5f66]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ boost/config/stdlib/libcpp.hpp | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/boost/config/stdlib/libcpp.hpp b/boost/config/stdlib/libcpp.hpp
+index bc8536ead..0e9f2445e 100644
+--- a/boost/config/stdlib/libcpp.hpp
++++ b/boost/config/stdlib/libcpp.hpp
+@@ -168,4 +168,13 @@
+ #  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+ #endif
++#if _LIBCPP_VERSION >= 15000
++//
++// Unary function is now deprecated in C++11 and later:
++//
++#if __cplusplus >= 201103L
++#define BOOST_NO_CXX98_FUNCTION_BASE
++#endif
++#endif
++
+ //  --- end ---
+-- 
+2.37.2
+
index dd5d6eadd6138bb05f72c669f5c7e8275b52ef27..09e255679031343379133ad777ae7074df7888cf 100644 (file)
@@ -5,4 +5,5 @@ SRC_URI += "file://boost-CVE-2012-2677.patch \
            file://boost-math-disable-pch-for-gcc.patch \
            file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
            file://0001-dont-setup-compiler-flags-m32-m64.patch \
+           file://0001-The-std-lib-unary-binary_function-base-classes-are-d.patch \
            "