Re: [PATCH v9 01/15] syscalls: Make --abis parsing more robust

From: Arnd Bergmann

Date: Thu Nov 12 2026 - 09:25:55 EST


On Thu, Nov 5, 2026, at 21:05, André Almeida wrote:
> Some archs Makefile have something like this as the rule for making the
> syscall files:
>
> cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@
>
> The $* symbol is evaluated to the variable found at $(uapi)/unistd-%.h,
> where % is 32 or 64, resulting in e.g. `--abis common,32`. Sometimes the
> rule for the file won't have a %, resulting in a trailing comma e.g.
> `--abis common,`.
>
> Currently this input is transformed into (common|). This is problematic
> because grep will then match any ABI because of the trailing `|`. Make the
> syscalls scripts more robust by removing any trailing comma.
>
> Signed-off-by: André Almeida <andrealmeid@xxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>