aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorZhangjin Wu <[email protected]>2023-06-19 20:25:47 +0800
committerWilly Tarreau <[email protected]>2023-08-06 12:27:53 +0200
commit2f98aca8aaef0fca36adff5c478af1788997debd (patch)
tree3001a36f4676262c0b44087f680248734de254b6 /tools/perf/scripts/python
parentca50df3098939578d577477a9464a46a2e9fea66 (diff)
tools/nolibc: fix up undeclared syscall macros with #ifdef and -ENOSYS
Compiling nolibc for rv32 got such errors: nolibc/sysroot/riscv/include/sys.h: In function ‘sys_gettimeofday’: nolibc/sysroot/riscv/include/sys.h:557:21: error: ‘__NR_gettimeofday’ undeclared (first use in this function); did you mean ‘sys_gettimeofday’? 557 | return my_syscall2(__NR_gettimeofday, tv, tz); | ^~~~~~~~~~~~~~~~~ nolibc/sysroot/riscv/include/sys.h: In function ‘sys_lseek’: nolibc/sysroot/riscv/include/sys.h:675:21: error: ‘__NR_lseek’ undeclared (first use in this function) 675 | return my_syscall3(__NR_lseek, fd, offset, whence); | ^~~~~~~~~~ nolibc/sysroot/riscv/include/sys.h: In function ‘sys_wait4’: nolibc/sysroot/riscv/include/sys.h:1341:21: error: ‘__NR_wait4’ undeclared (first use in this function) 1341 | return my_syscall4(__NR_wait4, pid, status, options, rusage); If a syscall macro is not supported by a target platform, wrap it with '#ifdef' and 'return -ENOSYS' for the '#else' branch, which lets the other syscalls work as-is and allows developers to fix up the test failures reported by nolibc-test one by one later. This wraps all of the failed syscall macros with '#ifdef' and 'return -ENOSYS' for the '#else' branch, so, all of the undeclared failures are fixed. Suggested-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/linux-riscv/[email protected]/ Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Zhangjin Wu <[email protected]> Signed-off-by: Willy Tarreau <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions