src/basic: generate missing syscall headers programatically
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Jan 2021 16:06:19 +0000 (17:06 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Jan 2021 17:36:16 +0000 (18:36 +0100)
commit35b42e560039fd87d4ae4d99cd54d1d4e89710b1
treed608d5b27bbdab15becb61c6395e0c1839235d35
parent79758570798dd82ab60cdae3f4ae1fa3f48823a1
src/basic: generate missing syscall headers programatically

Getting the numbers right for all architectures has proven to be a
constant chore. Let's autogenerate the header from the tables that
were imported in one of the previous commits.

Fixes #18074. (Hopefully. I cannot verify this on all architectures.)

To update the lists, or to update the header after template changes:
ninja -C build update-syscall-tables update-syscall-header

Note: the generated file is saved in git. Initially I wanted to only
store the tables in git, and generate the header during each build.
Generation is quick enough, but the header is used in many many
places (wherever missing_syscall.h is included, directly or indirectly),
which means that we would need to declare the dependency in meson, so
the header would be generated early enough. This turned out to be very
noisy. Storing the generated header in version control avoids the hassle.
src/basic/meson.build
src/basic/missing_syscall.h
src/basic/missing_syscall_def.h [new file with mode: 0644]
src/basic/missing_syscalls.py [new file with mode: 0644]