Re: [PATCH] kbuild: only clean objtool on mrproper

From: Josh Poimboeuf

Date: Wed Feb 25 2026 - 15:38:22 EST


On Wed, Feb 25, 2026 at 09:23:09PM +0100, Michal Suchánek wrote:
> On Wed, Feb 25, 2026 at 01:04:17PM -0700, Nathan Chancellor wrote:
> > On Wed, Feb 25, 2026 at 12:26:29PM +0100, Michal Suchanek wrote:
> > > For packaging purposes I want to be able to grab the tool binaries
> > > without the .o files
> > >
> > > Fixes: 68b4fe32d737 ("kbuild: Add objtool to top-level clean target")
> > > Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> >
> > Wouldn't resolve_btfids need the same treatment?
>
> No, make clean runs the clean target for resolve_btfids but the tool
> remains.
>
> > Why is objtool special here?
>
> That's what I would like to know as well.
>
> > Also, what's the use case? Running 'make clean' then copying what
> > is left?
>
> Yes, that's what my build script has been doing for at least a decade,
> possibly mutiple decades when it was somebody else's build script.

Why is the build script doing that?

--
Josh