summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-11-16 12:46:58 -0800
committerKhem Raj <raj.khem@gmail.com>2020-11-17 08:02:17 -0800
commitaff3d51fd973c5543983f2a9456cfd6e7703505d (patch)
treeb22016dcd45d72fd3293bfbd52405b21a9d1f35f
parent81128c31544863189d2fec11b74fa4589cd1651d (diff)
downloadmeta-clang-aff3d51fd973c5543983f2a9456cfd6e7703505d.tar.gz
clang: Fix the __NR_futex_time64 patch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch19
1 files changed, 7 insertions, 12 deletions
diff --git a/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch b/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch
index 0d57cc7..9097047 100644
--- a/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch
+++ b/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch
@@ -14,13 +14,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 libcxx/src/atomic.cpp | 10 ++++++++++ 14 libcxx/src/atomic.cpp | 10 ++++++++++
15 1 file changed, 10 insertions(+) 15 1 file changed, 10 insertions(+)
16 16
17diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
18index 6b73ed771cd..d2511529dce 100644
19--- a/libcxx/src/atomic.cpp 17--- a/libcxx/src/atomic.cpp
20+++ b/libcxx/src/atomic.cpp 18+++ b/libcxx/src/atomic.cpp
21@@ -15,6 +15,16 @@ 19@@ -21,6 +21,16 @@
22 20 #include <linux/futex.h>
23 #ifdef __linux__ 21 #include <sys/syscall.h>
24 22
25+// libc++ uses SYS_futex, which it expects from system C library. 23+// libc++ uses SYS_futex, which it expects from system C library.
26+// in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex) 24+// in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex)
@@ -29,12 +27,9 @@ index 6b73ed771cd..d2511529dce 100644
29+// this aliases it to NR_futex so that SYS_futex is then defined for rv32 27+// this aliases it to NR_futex so that SYS_futex is then defined for rv32
30+ 28+
31+#if !defined(SYS_futex) && defined(SYS_futex_time64) 29+#if !defined(SYS_futex) && defined(SYS_futex_time64)
32+# define SYS_futex SYS_futex_time64 30+#define SYS_futex SYS_futex_time64
33+#endif 31+#endif
34+ 32+
35 #include <unistd.h> 33 #else // <- Add other operating systems here
36 #include <linux/futex.h> 34
37 #include <sys/syscall.h> 35 // Baseline needs no new headers
38--
392.29.2
40