All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2021.02.x] package/capnproto: fix build on riscv32
@ 2021-06-10  8:46 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2021-06-10  8:46 UTC (permalink / raw
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=f265d103c664c6644f14a0fc9e87fbfb799cd090
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.02.x

Fixes:
 - http://autobuild.buildroot.org/results/1c1cd4775241ee57d878cad5c978413d4b4a8736

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit e8c2a3e2d8e1386f9f153238046e5968acf4517a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...-32-bit-architectures-using-64-bit-time_t.patch | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/package/capnproto/0001-mutex-Fix-build-on-32-bit-architectures-using-64-bit-time_t.patch b/package/capnproto/0001-mutex-Fix-build-on-32-bit-architectures-using-64-bit-time_t.patch
new file mode 100644
index 0000000000..ce70ab8f29
--- /dev/null
+++ b/package/capnproto/0001-mutex-Fix-build-on-32-bit-architectures-using-64-bit-time_t.patch
@@ -0,0 +1,37 @@
+From e2a05a19e9dc51287e19cc9f11fd91449219e361 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 15 Nov 2020 12:10:28 -0800
+Subject: [PATCH] mutex: Fix build on 32-bit architectures using 64-bit time_t
+
+mutex code uses SYS_futex, which it expects from system C library.
+in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex)
+rv32 is using 64bit time_t from get go unlike other 32bit architectures
+in glibc, therefore it wont have NR_futex defined but just NR_futex_time64
+this aliases it to NR_futex so that SYS_futex is then defined for rv32
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[Retrieved from:
+https://github.com/capnproto/capnproto/commit/e2a05a19e9dc51287e19cc9f11fd91449219e361]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ c++/src/kj/mutex.c++ | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/c++/src/kj/mutex.c++ b/c++/src/kj/mutex.c++
+index c81cead7b..e1594b117 100644
+--- a/c++/src/kj/mutex.c++
++++ b/c++/src/kj/mutex.c++
+@@ -39,7 +39,13 @@
+ 
+ #ifndef SYS_futex
+ // Missing on Android/Bionic.
++#ifdef __NR_futex
+ #define SYS_futex __NR_futex
++#elif defined(SYS_futex_time64)
++#define SYS_futex SYS_futex_time64
++#else
++#error "Need working SYS_futex"
++#endif
+ #endif
+ 
+ #ifndef FUTEX_WAIT_PRIVATE

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-10  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-10  8:46 [Buildroot] [git commit branch/2021.02.x] package/capnproto: fix build on riscv32 Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.