Re: [PATCH 1/1] kbuild: record real-prereqs in .cmd files
From: Luis Augenstein
Date: Fri Aug 21 2026 - 16:03:09 EST
On 8/18/26 21:51, Nathan Chancellor wrote:
Sashiko has a comment that this produces different results based on a
clean versus incremental build:
https://sashiko.dev/#/patchset/59032
I can reproduce this with:
$ make -skj"$(nproc)" ARCH=x86_64 mrproper defconfig lib/oid_registry.o
$ grep -n oid_registry_data lib/.oid_registry.o.cmd
3:make_prereqs_lib/oid_registry.o := lib/oid_registry.c lib/oid_registry_data.c
1111: lib/oid_registry_data.c \
$ touch lib/oid_registry.c
$ make -skj"$(nproc)" ARCH=x86_64 lib/oid_registry.o
$ grep -n oid_registry_data lib/.oid_registry.o.cmd
1111: lib/oid_registry_data.c \
As this is just metadata for external tools (i.e., it does not get
consumed by Kbuild again), we could just require them to filter
duplicates after the fact?
True, some Make prerequisites also appear in deps_*, so the filter
dropped them from make_prereqs_* on incremental builds.
However, we cannot just remove the filter. After the .cmd is included,
$(real-prereqs) contains $(deps_$@), so the whole deps_* list would
show up in make_prereqs_* on a rebuild.
We could move the filter into fixdep and filter based on the new .d file, so the overlap is removed already on a clean build.
thanks,
Luis
--
Luis Augenstein * luis.augenstein@xxxxxxxxxxx * +4915225275761
TNG Technology Consulting GmbH, Beta-Str. 13, 85774 Unterföhring
Geschäftsführer: Dr. Robert Dahlke, Thomas Endres, Moritz Prinz
Aufsichtsratsvorsitzender: Henrik Klagges
Sitz: Unterföhring * Registergericht: Amtsgericht München * Handelsregisternummer: HRB 135082
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature