Re: [PATCH] tools/dma: fix building with O=
From: Qinxin Xia
Date: Mon Oct 12 2026 - 22:10:47 EST
On 2026/10/12 06:33:31, Sasha Levin <sashal@xxxxxxxxxx> wrote:
With O= set, "all" depends on $(OUTPUT)dma_map_benchmark, but the only
rule builds dma_map_benchmark in the source directory, and built-in
rules are disabled:
make: *** No rule to make target '<O>/dma_map_benchmark', needed by 'all'. Stop.
Build $(OUTPUT)dma_map_benchmark.
Fixes: f74ee32963f1b ("tools/dma: move dma_map_benchmark from selftests to tools/dma")
Cc: stable@xxxxxxxxxxxxxxx
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
tools/dma/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/dma/Makefile b/tools/dma/Makefile
index e4abf37bf020c..0c239a6b9eae5 100644
--- a/tools/dma/Makefile
+++ b/tools/dma/Makefile
@@ -38,8 +38,8 @@ prepare: $(OUTPUT)include/linux/map_benchmark.h
FORCE:
DMA_MAP_BENCHMARK = dma_map_benchmark
-$(DMA_MAP_BENCHMARK): prepare FORCE
- $(CC) $(CFLAGS) $(DMA_MAP_BENCHMARK).c -o $(DMA_MAP_BENCHMARK)
+$(OUTPUT)$(DMA_MAP_BENCHMARK): prepare FORCE
+ $(CC) $(CFLAGS) $(DMA_MAP_BENCHMARK).c -o $@
clean:
rm -f $(ALL_PROGRAMS)
Acked-by: Qinxin Xia <xiaqinxin@xxxxxxxxxx>
--
Thanks,
Qinxin