public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Michal Suchanek <msuchanek@suse.de>,
	Rainer Fiebig <jrf@mailbox.org>
Subject: Re: [PATCH] kbuild: Leave objtool binary around with 'make clean'
Date: Sat, 28 Feb 2026 08:27:06 +0100	[thread overview]
Message-ID: <aaKYys24qkqTrDcy@levanger> (raw)
In-Reply-To: <20260227-avoid-objtool-binary-removal-clean-v1-1-122f3e55eae9@kernel.org>

On Fri, Feb 27, 2026 at 10:40:48PM -0700, Nathan Chancellor wrote:
> The difference between 'make clean' and 'make mrproper' is documented in
> 'make help' as:
> 
>   clean     - Remove most generated files but keep the config and
>               enough build support to build external modules
>   mrproper  - Remove all generated files + config + various backup files
> 
> After commit 68b4fe32d737 ("kbuild: Add objtool to top-level clean
> target"), running 'make clean' then attempting to build an external
> module with the resulting build directory fails with
> 
>   $ make ARCH=x86_64 O=build clean
> 
>   $ make -C build M=... MO=...
>   ...
>   /bin/sh: line 1: .../build/tools/objtool/objtool: No such file or directory
> 
> as 'make clean' removes the objtool binary.
> 
> Split the objtool clean target into mrproper and clean like Kbuild does
> and remove all generated artifacts with 'make clean' except for the
> objtool binary, which is removed with 'make mrproper'.
> 
> Cc: stable@vger.kernel.org
> Fixes: 68b4fe32d737 ("kbuild: Add objtool to top-level clean target")
> Reported-by: Michal Suchanek <msuchanek@suse.de>
> Closes: https://lore.kernel.org/20260225112633.6123-1-msuchanek@suse.de/
> Reported-by: Rainer Fiebig <jrf@mailbox.org>
> Closes: https://lore.kernel.org/62d12399-76e5-3d40-126a-7490b4795b17@mailbox.org/
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> I realize that this will technically decend into tools/objtool twice
> during cleaning when running mrproper but I don't think it is the end of
> the world for a much simpler implementation.

Yes, I think that should be ok.

Reviewed-by: Nicolas Schier <nsc@kernel.org>
Tested-by: Nicolas Schier <nsc@kernel.org>


-- 
Nicolas

  reply	other threads:[~2026-02-28  7:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  5:40 [PATCH] kbuild: Leave objtool binary around with 'make clean' Nathan Chancellor
2026-02-28  7:27 ` Nicolas Schier [this message]
2026-02-28 11:08 ` Peter Zijlstra
2026-02-28 17:29 ` Josh Poimboeuf
2026-03-02 19:18 ` -next build error due to "kbuild: Leave objtool binary around with 'make clean'" Thorsten Leemhuis
2026-03-02 19:43   ` Michal Suchánek
2026-03-02 20:49     ` Nathan Chancellor
2026-03-03  5:51       ` Thorsten Leemhuis
2026-03-05  0:36 ` [PATCH] kbuild: Leave objtool binary around with 'make clean' Nathan Chancellor

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=aaKYys24qkqTrDcy@levanger \
    --to=nsc@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=jrf@mailbox.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msuchanek@suse.de \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox