summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/boost
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-02-20 22:20:28 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-21 21:52:08 +0000
commit2702bac9e5c13f8a30153a1c45b278eebc9f11e5 (patch)
tree4bc730e08cb9415e9af562e5b54cfdcd2dcaa51c /meta/recipes-support/boost
parent65ddc0f68fc2e6e8fd38ac48fd18e8099b52ec1b (diff)
downloadopenembedded-core-2702bac9e5c13f8a30153a1c45b278eebc9f11e5.tar.gz
boost: Fix build on 32bit arches with 64bit time_t defaults
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/boost')
-rw-r--r--meta/recipes-support/boost/boost/0001-futex-fix-build-on-32-bit-architectures-using-64-bit.patch36
-rw-r--r--meta/recipes-support/boost/boost_1.78.0.bb1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/boost/0001-futex-fix-build-on-32-bit-architectures-using-64-bit.patch b/meta/recipes-support/boost/boost/0001-futex-fix-build-on-32-bit-architectures-using-64-bit.patch
new file mode 100644
index 0000000000..20dc3ca54e
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-futex-fix-build-on-32-bit-architectures-using-64-bit.patch
@@ -0,0 +1,36 @@
+From b15d8d0754bb545ba10d0cfba8bbfdfb22a62c38 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 20 Feb 2022 22:03:14 -0800
+Subject: [PATCH] futex: fix build on 32-bit architectures using 64-bit time_t
+
+Fix the following build failure on 32-bit architectures using 64-bit
+time_t (e.g. riscv32):
+| ./boost/fiber/detail/futex.hpp:31:23: error: use of undeclared identifier 'SYS_futex'
+| return ::syscall( SYS_futex, addr, op, x, nullptr, nullptr, 0);
+| ^
+| 1 error generated.
+
+Upstream-Status: Submitted [https://github.com/boostorg/fiber/pull/292]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ boost/fiber/detail/futex.hpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/boost/fiber/detail/futex.hpp b/boost/fiber/detail/futex.hpp
+index e64bd5990..d0353e9e5 100644
+--- a/boost/fiber/detail/futex.hpp
++++ b/boost/fiber/detail/futex.hpp
+@@ -12,6 +12,10 @@
+
+ #include <boost/fiber/detail/config.hpp>
+
++#ifndef SYS_futex
++#define SYS_futex SYS_futex_time64
++#endif
++
+ #if BOOST_OS_LINUX
+ extern "C" {
+ #include <linux/futex.h>
+--
+2.35.1
+
diff --git a/meta/recipes-support/boost/boost_1.78.0.bb b/meta/recipes-support/boost/boost_1.78.0.bb
index f4b6ed8576..58be9dcf12 100644
--- a/meta/recipes-support/boost/boost_1.78.0.bb
+++ b/meta/recipes-support/boost/boost_1.78.0.bb
@@ -6,4 +6,5 @@ SRC_URI += "file://boost-CVE-2012-2677.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://de657e01635306085488290ea83de541ec393f8b.patch \
+ file://0001-futex-fix-build-on-32-bit-architectures-using-64-bit.patch \
"