Skip to content

Commit

Permalink
meson: drop arch filtering in syscall list
Browse files Browse the repository at this point in the history
I added the filtering in 752fedb as a way
to reduce the number of items in the tables. I thought it's "obvious", but
it might not be so.

One immediate problem is that the filter is broken, because on arm64,
os.uname().machine returns "aarch64", so we incorrectly filter out the arm
syscalls (there is just one: arm_fadvise64_64). Of course we could fix the
filter, but I think it's better to nuke it altogether. The filter on applies to
1 arm syscall and 5 s390 syscalls, and we have 500+ other syscalls, so this
"optimization" doesn't really matter. OTOH, if we get the filter wrong,
the result is bad. And also, the existence of the filter at all creates
problems for cross-builds.

I wanted to get rid of 'generate-syscall-list.py', but we need to generate a
backslash in the output. mesonbuild/meson#1564 makes
this very very hard, since any attempt to put a backslash an inline argument
results in the backslash being replaces by a forward slash, which doesn't quite
have the same meaning. So let's use a standalone script until
mesonbuild/meson#1564 is resolved.

(cherry picked from commit 58fcc6b)
(cherry picked from commit ded73e6)
(cherry picked from commit d31ac84)
  • Loading branch information
keszybz authored and bluca committed Feb 28, 2024
1 parent c8f6e62 commit 1275704
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/shared/generate-syscall-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

import sys
import os

s390 = 's390' in os.uname().machine
arm = 'arm' in os.uname().machine

for line in open(sys.argv[1]):
if line.startswith('s390_') and not s390:
continue
if line.startswith('arm_') and not arm:
continue

print('"{}\\0"'.format(line.strip()))

0 comments on commit 1275704

Please sign in to comment.