[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUU=nVxcQpfVR6s9fGomY0zEx22a8Ge4Uw8rL84JNu+0oA@mail.gmail.com>
Date: Thu, 21 Jan 2021 03:36:28 +0100
From: Sedat Dilek <sedat.dilek@...il.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <natechancellor@...il.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Quentin Monnet <quentin@...valent.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
Tobias Klauser <tklauser@...tanz.ch>,
Ilya Leoshkevich <iii@...ux.ibm.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Yulia Kartseva <hex@...com>, Andrey Ignatov <rdna@...com>,
Thomas Hebb <tommyhebb@...il.com>,
Stephane Eranian <eranian@...gle.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Davide Caratti <dcaratti@...hat.com>,
Briana Oursler <briana.oursler@...il.com>,
netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Clang-Built-Linux ML <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH RFC] tools: Factor Clang, LLC and LLVM utils definitions
On Wed, Jan 20, 2021 at 11:36 PM Jiri Olsa <jolsa@...hat.com> wrote:
>
> On Sat, Jan 16, 2021 at 10:54:04AM +0100, Sedat Dilek wrote:
> > When dealing with BPF/BTF/pahole and DWARF v5 I wanted to build bpftool.
> >
> > While looking into the source code I found duplicate assignments
> > in misc tools for the LLVM eco system, e.g. clang and llvm-objcopy.
> >
> > Move the Clang, LLC and/or LLVM utils definitions to
> > tools/scripts/Makefile.include file and add missing
> > includes where needed.
> > Honestly, I was inspired by commit c8a950d0d3b9
> > ("tools: Factor HOSTCC, HOSTLD, HOSTAR definitions").
> >
> > I tested with bpftool and perf on Debian/testing AMD64 and
> > LLVM/Clang v11.1.0-rc1.
> >
> > Build instructions:
> >
> > [ make and make-options ]
> > MAKE="make V=1"
> > MAKE_OPTS="HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld CC=clang LD=ld.lld LLVM=1 LLVM_IAS=1"
> > MAKE_OPTS="$MAKE_OPTS PAHOLE=/opt/pahole/bin/pahole"
> >
> > [ clean-up ]
> > $MAKE $MAKE_OPTS -C tools/ clean
> >
> > [ bpftool ]
> > $MAKE $MAKE_OPTS -C tools/bpf/bpftool/
> >
> > [ perf ]
> > PYTHON=python3 $MAKE $MAKE_OPTS -C tools/perf/
> >
> > I was careful with respecting the user's wish to override custom compiler,
> > linker, GNU/binutils and/or LLVM utils settings.
> >
> > Some personal notes:
> > 1. I have NOT tested with cross-toolchain for other archs (cross compiler/linker etc.).
> > 2. This patch is on top of Linux v5.11-rc3.
> >
> > I hope to get some feedback from especially Linux-bpf folks.
> >
> > Signed-off-by: Sedat Dilek <sedat.dilek@...il.com>
> > ---
> > tools/bpf/bpftool/Makefile | 2 --
> > tools/bpf/runqslower/Makefile | 3 ---
> > tools/build/feature/Makefile | 4 ++--
> > tools/perf/Makefile.perf | 1 -
>
> for tools/build and tools/perf
>
> Acked-by: Jiri Olsa <jolsa@...hat.com>
>
Thanks Jiri for your feedback and ACK.
- Sedat -
> jirka
>
> > tools/scripts/Makefile.include | 7 +++++++
> > tools/testing/selftests/bpf/Makefile | 3 +--
> > tools/testing/selftests/tc-testing/Makefile | 3 +--
> > 7 files changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> > index f897cb5fb12d..71c14efa6e91 100644
> > --- a/tools/bpf/bpftool/Makefile
> > +++ b/tools/bpf/bpftool/Makefile
>
> SNIP
>
Powered by blists - more mailing lists