Thread (21 messages) 21 messages, 2 authors, 2021-01-20

Re: perf tools build broken for RISCV 32 bit

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-01-18 11:56:52
Also in: linux-riscv

On Mon, Jan 18, 2021 at 12:35 PM Emiliano Ingrassia
[off-list ref] wrote:
|#if __WORDSIZE == 32
|/* Workarounds for generic code needing to handle 64-bit time_t.
|...
|/* Fix sysdeps/nptl/lowlevellock-futex.h.  */
|#define __NR_futex              __NR_futex_time64

a possible solution to fix the build of perf tool on RISCV 32 bit could
be the following patch to file tools/arch/riscv/include/uapi/asm/unistd.h:
|+
|+#ifndef __NR_futex
|+#define __NR_futex __NR_futex_time64
|+#endif

What do you think about it? Could it be a correct solution?
No, that would be much worse: __NR_futex must only ever point
to the system call that takes the old timespec argument. If you define
something like this, it breaks applications that try to do the right thing.

       Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help