lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fVEcuWbfO2NoTPanUmXXF6bejnN1s8Lm704P8TvKc1yKQ@mail.gmail.com>
Date:   Thu, 12 Jan 2023 12:54:45 -0800
From:   Ian Rogers <irogers@...gle.com>
To:     Nicolas Schier <nicolas@...sle.eu>
Cc:     Josh Poimboeuf <jpoimboe@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        Stephane Eranian <eranian@...gle.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH v3 1/3] objtool: Install libsubcmd in build

On Thu, Jan 12, 2023 at 12:32 PM Nicolas Schier <nicolas@...sle.eu> wrote:
>
> On Thu, Jan 05, 2023 at 01:01:53AM -0800 Ian Rogers wrote:
> > Including from tools/lib can create inadvertent dependencies. Install
> > libsubcmd in the objtool build and then include the headers from
> > there.
> >
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> > Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>
> > ---
> >  tools/objtool/Build    |  2 --
> >  tools/objtool/Makefile | 33 +++++++++++++++++++++++++--------
> >  2 files changed, 25 insertions(+), 10 deletions(-)
> >
> [...]
> > diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> > index a3a9cc24e0e3..fd9b3e3113c6 100644
> > --- a/tools/objtool/Makefile
> > +++ b/tools/objtool/Makefile
> > @@ -12,9 +12,15 @@ srctree := $(patsubst %/,%,$(dir $(CURDIR)))
> >  srctree := $(patsubst %/,%,$(dir $(srctree)))
> >  endif
> >
> > -SUBCMD_SRCDIR                = $(srctree)/tools/lib/subcmd/
> > -LIBSUBCMD_OUTPUT     = $(or $(OUTPUT),$(CURDIR)/)
> > -LIBSUBCMD            = $(LIBSUBCMD_OUTPUT)libsubcmd.a
> > +LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/
> > +ifneq ($(OUTPUT),)
> > +  LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd
> > +else
> > +  LIBSUBCMD_OUTPUT = $(CURDIR)/libsubcmd
> > +endif
> > +LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT)
>
> Hi Ian,
>
> Is there a reason for distinguishing between $(LIBSUBCMD_DESTDIR) and
> $(LIBSUBCMD_OUTPUT)?

I believe the naming aligns with their use when passed to the
corresponding sub-make variable, so "DESTDIR=$(LIBSUBCMD_DESTDIR)". It
is possible to do other this, a slightly different convention is in
some BPF related code:
https://lore.kernel.org/lkml/20230112004024.1934601-1-irogers@google.com/

Thanks,
Ian

> Reviewed-by: Nicolas Schier <nicolas@...sle.eu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ