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

Re: perf tools build broken for RISCV 32 bit

From: Emiliano Ingrassia <hidden>
Date: 2021-01-18 14:25:25
Also in: linux-riscv

Hi Arnd,

thank you for the quick reply and support.

On Mon, Jan 18, 2021 at 12:56:11PM +0100, Arnd Bergmann wrote:
On Mon, Jan 18, 2021 at 12:35 PM Emiliano Ingrassia
[off-list ref] wrote:
quoted
|#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
OK, but what should be the right solution for RISCV 32 bit in this case?
Is it a problem in the libc implementation or in RISCV/perf implementation?

Thank you, best regards.

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