From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Quentin Monnet <quentin@isovalent.com>
Cc: Song Liu <songliubraving@fb.com>,
Network Development <netdev@vger.kernel.org>,
bpf <bpf@vger.kernel.org>, Kernel Team <kernel-team@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH bpf-next 1/2] bpftool: only build bpftool-prog-profile with clang >= v11
Date: Tue, 10 Mar 2020 15:54:14 -0700 [thread overview]
Message-ID: <CAADnVQJhSEE3nuWupoUGgOU_0+OnKg4c_buMCSLyoQY3J9a_Ng@mail.gmail.com> (raw)
In-Reply-To: <65be9b45-059a-fc41-fd47-a6b9d7cda418@isovalent.com>
On Tue, Mar 10, 2020 at 3:45 PM Quentin Monnet <quentin@isovalent.com> wrote:
>
> 2020-03-10 11:36 UTC-0700 ~ Song Liu <songliubraving@fb.com>
> > bpftool-prog-profile requires clang of version 11.0.0 or newer. If
> > bpftool is built with older clang, show a hint of to the user.
> >
> > Signed-off-by: Song Liu <songliubraving@fb.com>
> > ---
> > tools/bpf/bpftool/Makefile | 13 +++++++++++--
> > tools/bpf/bpftool/prog.c | 2 ++
> > 2 files changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> > index 20a90d8450f8..05a37f0f76a9 100644
> > --- a/tools/bpf/bpftool/Makefile
> > +++ b/tools/bpf/bpftool/Makefile
> > @@ -60,6 +60,15 @@ LIBS = $(LIBBPF) -lelf -lz
> > INSTALL ?= install
> > RM ?= rm -f
> > CLANG ?= clang
> > +CLANG_VERS = $(shell $(CLANG) --version | head -n 1 | awk '{print $$3}')
> > +CLANG_MAJ = $(shell echo $(CLANG_VERS) | cut -d '.' -f 1)
>
> This will produce error messages on stderr if clang is not installed on
> the system.
>
> > +WITHOUT_SKELETONS = -DBPFTOOL_WITHOUT_SKELETONS
> > +
> > +ifeq ($(shell test $(CLANG_MAJ) -ge 11; echo $$?),0)
>
> Not exactly what I had in mind. I thought about the feature detection
> facility we have under tools/build/feature/, as is used for e.g.
> detecting libbfd. It would allow to check the feature is available,
> instead of tying the build to a numeric version number.
+1
I think the global data feature is actually present in v10.
Version check won't work for backported clangs.
So please do feature check.
next prev parent reply other threads:[~2020-03-10 22:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 18:36 [PATCH bpf-next 0/2] Fixes for bpftool-prog-profile Song Liu
2020-03-10 18:36 ` [PATCH bpf-next 1/2] bpftool: only build bpftool-prog-profile with clang >= v11 Song Liu
2020-03-10 22:44 ` Quentin Monnet
2020-03-10 22:54 ` Alexei Starovoitov [this message]
2020-03-10 18:36 ` [PATCH bpf-next 2/2] bpftool: skeleton should depend on libbpf Song Liu
2020-03-10 22:00 ` [PATCH bpf-next 0/2] Fixes for bpftool-prog-profile John Fastabend
2020-03-11 4:33 ` Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAADnVQJhSEE3nuWupoUGgOU_0+OnKg4c_buMCSLyoQY3J9a_Ng@mail.gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jolsa@kernel.org \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=quentin@isovalent.com \
--cc=songliubraving@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).