Re: [PATCH bpf-next 4/4] kbuild: Add resolve_btfids clean to root clean target

Jiri Olsa
2021-02-12T13:37:15Z

On Fri, Feb 12, 2021 at 12:30:45PM +0900, Masahiro Yamada wrote:

SNIP

>
> I expected this kind of mess
> when I saw 33a57ce0a54d498275f432db04850001175dfdfa
>
>
> The tools/ directory is a completely different world
> governed by a different build system
> (no, not a build system, but a collection of adhoc makefile code)
>
>
> All the other programs used during the kernel build
> are located under scripts/, and can be built with
> a simple syntax, and cleaned up correctly.
> It is simple, clean and robust.
>
> objtool is the first alien that opt out Kbuild,
> and this is the second one.
>
>
> It is scary to mix up two different things,
> which run in different working directories.

would you see any way out? apart from changing resolve_btfids
to use Kbuild.. there are some dependencies we'd need to change
as well and they are used by other tools.. probably it'd end up
with all or nothing scenario

>
> See, this is wired up in the top Makefile
> in an ugly way, and you are struggling
> in suppressing issues, where you can never
> do it in the right way.

maybe we could move it out of top makefile into separate one,
that would handle all the related mess

jirka