Re: [PATCH] selftests: lib.mk: define LINK.c, COMPILE.S and LINK.S when make has none
From: Sasha Levin
Date: Sun Nov 01 2026 - 20:33:50 EST
On Sun, Oct 11, 2026 at 06:33:34PM -0400, Sasha Levin wrote:
>The kernel build runs make with -rR, which removes make's built-in rules
>and variables. tools/testing/selftests/Makefile copes by clearing
>MAKEFLAGS for its sub-makes, and lib.mk defines LINK.c, COMPILE.S and
>LINK.S again, but only when building_out_of_srctree is set. A selftest
>directory built directly by a make that inherited -R gets neither, so
>LINK.c is empty and the generic rule tries to execute the source file:
>
> make[4]: acct_syscall.c: No such file or directory
Hi Shuah,
Ping on this one. It still applies to v7.4-rc1.
The tools_build series [1] depends on it: without it, 70 of the 74
selftests the series builds fail this way. Could you pick it up for
7.5, or ack it so it can go through kbuild with the next version of the
series?
[1] https://lore.kernel.org/r/20261016143143.3613501-1-sashal@xxxxxxxxxx
--
Thanks,
Sasha