]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools build: Fix feature checks to touch target files on success
authorIan Rogers <irogers@google.com>
Sun, 31 May 2026 01:09:24 +0000 (18:09 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 4 Jun 2026 13:58:47 +0000 (10:58 -0300)
commit7e1f74bbbed7d3bf2f0597f820eba15ec70f35fa
treeb196b782efcde5724b33d792479e255d71e20738
parent4caadd04f62104997cbf3c71364b0509e7b64108
tools build: Fix feature checks to touch target files on success

In tools/build/feature/Makefile, test-clang-bpf-co-re.bin and
test-bpftool-skeletons.bin redirected grep output but never touched or
created the $@ target file upon success.

Because the target file was never created on disk, Kbuild could never cache
the result of the check. Consequently, Make treated the prerequisite as
missing and continuously re-executed the Clang BPF backend and bpftool
feature checks on every single sub-make evaluation during build startup, or
on every incremental build.

Refactor both feature check recipes to touch $@ on success. For
test-clang-bpf-co-re.bin, group the shell pipeline within curly braces
and redirect both stdout and stderr to .make.output to allow errors to
be inspected and not appear in build output.

List test-clang-bpf-co-re.bin's input C file as a dependency so
modification triggers a rebuild. For test-bpftool-skeletons.bin, add it
to the FILES list so that it will be cleaned.

Assisted-by: Gemini:gemini-3.1-pro-preview
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: James Clark <james.clark@linaro.org>
Cc: Bill Wendling <morbo@google.com>
Cc: Costa Shulyupin <costa.shul@redhat.com>
Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Leo Yan <leo.yan@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
Cc: Yuzhuo Jing <yuzhuo@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/build/feature/Makefile