cpupower: keep O= builds inside the cpupower output directory
Subsystems (2)
Sasha Levin
maintainerPATCH 1/1 cpupower: keep O= builds inside the cpupower output directory
tools/Makefile builds cpupower with O= set to the top of the output tree and subdir= set to tools/power/cpupower, like the other tools it descends into. cpupower ignores subdir and puts its objects straight into $(O). Through the kernel's "make O=<dir> tools/cpupower" that is the kernel object tree, and "make O=<dir> tools/cpupower_clean" (also part of "make tools/clean") then runs
find $(O) -name '*.[oas]' | xargs rm -f
over the whole kernel object tree, deleting every kernel object file.
Append subdir to the output directory, as tools/scripts/Makefile.include does for the other tools. Builds that pass O= without subdir, including "make -C tools/power/cpupower O=<dir>", are unchanged.
Fixes bf35182ffcd00 ("tools: Honour the O= flag when tool build called from a higher Makefile")
Assisted-by LLM
Signed-off-by Sasha Levin <[email protected]>
--- tools/power/cpupower/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/cpupower/Makefile +1 -1
@@ -10,7 +10,7 @@ # OUTPUT=./ ifeq ("$(origin O)", "command line") - OUTPUT := $(O)/ + OUTPUT := $(O)/$(if $(subdir),$(subdir)/) endif ifneq ($(OUTPUT),)
Signature · 1 line
2.53.0