perf tools build broken for RISCV 32 bit
Arnd Bergmann
arnd at kernel.org
Mon Jan 18 06:56:11 EST 2021
On Mon, Jan 18, 2021 at 12:35 PM Emiliano Ingrassia
<ingrassia at epigenesys.com> 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
More information about the linux-riscv
mailing list