Browse Source

boost: Fix build on rv32

Define __NR_futex in terms for __NR_futex_time64 for rv32

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj 4 years ago
parent
commit
762911ea2e

+ 13 - 0
recipes-support/boost/boost/riscv32__NR_futex.patch

@@ -0,0 +1,13 @@
+--- a/libs/log/src/event.cpp
++++ b/libs/log/src/event.cpp
+@@ -31,6 +31,10 @@
+ #include <linux/futex.h>
+ #include <boost/memory_order.hpp>
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ // Some Android NDKs (Google NDK and older Crystax.NET NDK versions) don't define SYS_futex
+ #if defined(SYS_futex)
+ #define BOOST_LOG_SYS_FUTEX SYS_futex

+ 3 - 0
recipes-support/boost/boost_%.bbappend

@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_riscv32 = " file://riscv32__NR_futex.patch"