From 5e405f612e9f01c076ac4c65aa7a7e547c878cfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 25 Jul 2025 17:35:34 +0200 Subject: [PATCH] meson: add instructions for adding new arch to syscall.h --- src/include/override/sys/generate-syscall.py | 3 +++ src/include/override/sys/meson.build | 4 +++- src/include/override/sys/syscall.h | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/override/sys/generate-syscall.py b/src/include/override/sys/generate-syscall.py index 2a03623dbbd..8110d21ae8b 100644 --- a/src/include/override/sys/generate-syscall.py +++ b/src/include/override/sys/generate-syscall.py @@ -39,6 +39,9 @@ HEADER = '''\ * * Use 'ninja -C build update-syscall-tables' to download new syscall tables, * and 'ninja -C build update-syscall-header' to regenerate this file. + * + * To add a new architecture, extend the arch_list list in meson.build + * and the template in generate-syscall.py and then run the above commands. */ #pragma once diff --git a/src/include/override/sys/meson.build b/src/include/override/sys/meson.build index b66f9d055fd..1768650b348 100644 --- a/src/include/override/sys/meson.build +++ b/src/include/override/sys/meson.build @@ -31,7 +31,9 @@ syscall_list_txt = files('syscall-list.txt') syscall_lists = [] foreach arch: arch_list - syscall_lists += files('syscalls-@0@.txt'.format(arch)) + # We don't use files() here so that the 'update-syscall-tables' call + # above can run if arch_list is extended. + syscall_lists += meson.current_source_dir() / 'syscalls-@0@.txt'.format(arch) endforeach generate_syscall_py = find_program('generate-syscall.py') diff --git a/src/include/override/sys/syscall.h b/src/include/override/sys/syscall.h index f069e5f3c2f..f01803bae22 100644 --- a/src/include/override/sys/syscall.h +++ b/src/include/override/sys/syscall.h @@ -3,6 +3,9 @@ * * Use 'ninja -C build update-syscall-tables' to download new syscall tables, * and 'ninja -C build update-syscall-header' to regenerate this file. + * + * To add a new architecture, extend the arch_list list in meson.build + * and the template in generate-syscall.py and then run the above commands. */ #pragma once -- 2.47.3