[libcxx-commits] [PATCH] D85095: Fix libcxx build on riscv32
Khem Raj via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 2 10:18:09 PDT 2020
raj.khem created this revision.
raj.khem added a reviewer: asb.
Herald added subscribers: libcxx-commits, evandro, luismarques, sameer.abuasal, s.egerton, lenary, Jim, benna, psnobl, PkmX, rogfer01, shiva0217, kito-cheng, simoncook.
Herald added a project: libc++.
Herald added a reviewer: libc++.
raj.khem requested review of this revision.
RISCV glibc has decided to use 64bit time_t from get go unlike
other 32bit architecture, therefore, aliasing __NR_futex to
__NR_futex_time64 helps avoid the below errors on rv32
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85095
Files:
libcxx/src/atomic.cpp
Index: libcxx/src/atomic.cpp
===================================================================
--- libcxx/src/atomic.cpp
+++ libcxx/src/atomic.cpp
@@ -16,6 +16,9 @@
#include <iostream>
#ifdef __linux__
+#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
+# define __NR_futex __NR_futex_time64
+#endif
#include <unistd.h>
#include <linux/futex.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85095.282459.patch
Type: text/x-patch
Size: 372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200802/f1075871/attachment.bin>
More information about the libcxx-commits
mailing list