diff options
| author | Simon Glass <[email protected]> | 2026-03-04 11:48:53 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-16 10:41:40 -0600 |
| commit | a27980786cfb3c430aa1c05da8e79180c584d221 (patch) | |
| tree | 706a984712b49c1d7fbb1852edebbd057ae7a973 /include | |
| parent | 041364141b7daef8318a4b8495cac8570002773f (diff) | |
kbuild: strip sub_make_done from test-script environment
The exported sub_make_done variable leaks into the environment of all
child processes. When make targets like tcheck spawn independent
make-invocations with O=, those child-makes inherit sub_make_done=1,
skip the KBUILD_OUTPUT setup and try to build in the source tree.
A global 'unexport sub_make_done' cannot be used because the build
system itself re-invokes the top-level Makefile for syncconfig (via
'$(MAKE) -f $(srctree)/Makefile syncconfig'). Without sub_make_done,
that child make re-enters the KBUILD_OUTPUT block and recomputes
abs_objtree. With a relative O= path this resolves to a nested
directory (e.g. build/build/) where .config does not exist.
Instead, use 'env -u sub_make_done' in the test-target recipes so only
the test scripts see a clean environment. This allows their child make
invocations to process O= correctly without affecting internal kbuild
recursion.
This is not strictly a bugfix, but compare with:
commit 27529f1cb02d ("kbuild: skip parsing pre sub-make code for recursion")
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
