All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sasha Levin" <sashal@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	linux-kbuild@vger.kernel.org
Cc: "Shuah Khan" <shuah@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Jiri Olsa" <jolsa@kernel.org>, "Ian Rogers" <irogers@google.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"James Clark" <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Thorsten Leemhuis" <linux@leemhuis.info>
Subject: Re: [PATCH v4 6/7] kbuild: build the tools selected in tools/Kconfig as part of "make all"
Date: Fri, 13 Nov 2026 19:55:06 +0000	[thread overview]
Message-ID: <sashiko-outbox-213588@kernel.org> (raw)
In-Reply-To: <20261112195427.3411746-7-sashal@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] kbuild: make -n all fails in tools_build when
  CONFIG_TOOLS_BUILD_PERF=y
--

commit 0273f2e0753bd56565e4e6fbd57c3d5604e7d261
Author: Sasha Levin <sashal@kernel.org>

kbuild: build the tools selected in tools/Kconfig as part of "make all"

This commit makes the "all" target depend on "tools_build" when
CONFIG_TOOLS_BUILD is enabled so that selected tools are built during
standard kernel builds.

> diff --git a/Makefile b/Makefile
> index 7919263484f0a..2a69f4c73a641 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1650,6 +1650,10 @@ PHONY += tools_build
>  tools_build: headers
>  	$(Q)$(MAKE) -f $(srctree)/tools/Makefile.kbuild
>  
> +ifdef CONFIG_TOOLS_BUILD
> +all: tools_build
> +endif
> +
>  # ---------------------------------------------------------------------------
>  # Kernel selftest
>  

[Severity: Medium]
Does this break "make -n all" on a clean tree when CONFIG_TOOLS_BUILD_PERF
is enabled?

Because tools_build and the "build" macro in tools/Makefile.kbuild invoke
$(MAKE), GNU Make executes them during a dry run, creating directories
under tools-build/ and descending into tools/perf/Makefile.perf:

tools/perf/Makefile.perf:
$(LIBAPI): FORCE | $(LIBAPI_OUTPUT)
	$(Q)$(MAKE) -C $(LIBAPI_DIR) O=$(LIBAPI_OUTPUT) \
		DESTDIR=$(LIBAPI_DESTDIR) prefix= subdir= \
		$@ install_headers

Under "make -n", the $(Q)$(MKDIR) -p $@ recipe for the $(LIBAPI_OUTPUT)
order-only prerequisite is skipped, while the $(LIBAPI) sub-make still
runs and aborts in tools/scripts/Makefile.include with "O=.../libapi does
not exist".

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112195427.3411746-1-sashal@kernel.org?part=6

  reply	other threads:[~2026-11-13 19:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 19:54 [PATCH v4 0/7] kbuild: build the userspace tools in tools/ with the kernel Sasha Levin
2026-11-12 19:54 ` [PATCH v4 1/7] kbuild: factor the userspace ABI flags out into KBUILD_USERABI Sasha Levin
2026-11-13 19:55   ` sashiko-bot
2026-11-12 19:54 ` [PATCH v4 2/7] kbuild: add "make tools_build" to build userspace tools from tools/ Sasha Levin
2026-11-13 19:55   ` sashiko-bot
2026-11-12 19:54 ` [PATCH v4 3/7] perf build: Add MINIMAL=1 to build without optional features Sasha Levin
2026-11-13 19:55   ` sashiko-bot
2026-11-12 19:54 ` [PATCH v4 4/7] tools: build perf in tools_build Sasha Levin
2026-11-13 19:55   ` sashiko-bot
2026-11-12 19:54 ` [PATCH v4 5/7] tools: build kernel selftests " Sasha Levin
2026-11-13 19:55   ` sashiko-bot
2026-11-12 19:54 ` [PATCH v4 6/7] kbuild: build the tools selected in tools/Kconfig as part of "make all" Sasha Levin
2026-11-13 19:55   ` sashiko-bot [this message]
2026-11-12 19:54 ` [PATCH v4 7/7] Documentation: describe building tools with the kernel Sasha Levin
2026-11-13 19:55   ` sashiko-bot
2026-11-12 20:23 ` [PATCH v4 0/7] kbuild: build the userspace tools in tools/ " Andrew Morton
2026-11-13  1:52   ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-213588@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=linux@weissschuh.net \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.