[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190305163609.gz2cvpj7bxrnzdvm@treble>
Date: Tue, 5 Mar 2019 10:36:09 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Douglas Anderson <dianders@...omium.org>,
Robin Meijboom <robin@...jboom.info>,
Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Sam Ravnborg <sam@...nborg.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Michal Marek <michal.lkml@...kovi.net>
Subject: Re: [PATCH 3/3] objtool: move tools/objtool/ to scripts/objtool/
On Wed, Mar 06, 2019 at 01:08:27AM +0900, Masahiro Yamada wrote:
> > I do see the benefits. In many ways objtool is a more natural fit in
> > the scripts dir. But there are also some downsides to this change:
> >
> > - This will make it harder to package objtool as a standalone tool. It
> > has a lot of functionality that could be useful to other non-kernel
> > projects.
>
>
> If it is really useful for other projects,
> I'd like to see it as a real standalone tool,
> i.e. split as a separate project.
Fine, but who's going to do it? I don't have time for creating such a
project anytime soon. And anyway, moving the code to scripts in the
meantime would just make that harder when we do it eventually.
> > - It shares libsubcmd with perf. Including the subcmd .c files from
> > tools is hacky.
>
> Yes, hacky. We are shifting the ugliness between C and Build system.
>
> But, this hack can be solved; if subcmd library is useful, you can copy
> only necessary code into the objtool directory. You do not need all
> helpers from libsubcmd.
But then we are duplicating code...
> > - It's disruptive: it will break all the out-of-tree distro kernel
> > packaging scripts which now look for objtool in tools.
>
> All artifacts under scripts/ should be contained in the package.
> So, it should work.
It *will* break distro scripts which already expect objtool to be
located at tools/objtool/objtool.
> > You're right that objtool isn't a natural fit in tools, because it's
> > also used as part of the build. But it's not a natural fit in scripts
> > either. I think we've resolved most of those issues and it seems to be
> > working well these days.
> >
> > So instead of disrupting everything because "make mrproper" doesn't
> > work, I think I'd rather just do the following:
> >
> > diff --git a/Makefile b/Makefile
> > index ac5ac28a24e9..7e6696c9b862 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1364,7 +1364,7 @@ PHONY += $(mrproper-dirs) mrproper
> > $(mrproper-dirs):
> > $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
> >
> > -mrproper: clean $(mrproper-dirs)
> > +mrproper: clean $(mrproper-dirs) tools/objtool_clean
> > $(call cmd,rmdirs)
> > $(call cmd,rmfiles)
> >
>
> Works, and the clean log is also brilliant.
>
> I see the same log even when
> there is nothing to clean.
>
>
> masahiro@...ver:~/ref/linux$ make mrproper
> CLEAN .
> CLEAN arch/x86/entry/vdso
> CLEAN usr
> CLEAN arch/x86/tools
> CLEAN .tmp_versions
> CLEAN scripts/basic
> CLEAN scripts/kconfig
> CLEAN scripts/mod
> CLEAN scripts/selinux/genheaders
> CLEAN scripts/selinux/mdp
> CLEAN scripts
> DESCEND objtool
> CLEAN objtool
> CLEAN include/config include/generated arch/x86/include/generated
> CLEAN .config
> masahiro@...ver:~/ref/linux$ make mrproper
> DESCEND objtool
> CLEAN objtool
> masahiro@...ver:~/ref/linux$ make mrproper
> DESCEND objtool
> CLEAN objtool
Ok, but I'm sure that could be fixed. That's hardly a justification to
move objtool.
Anyway I would like to hear what Ingo and Peter think about moving it.
--
Josh
Powered by blists - more mailing lists