[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW6SJ=Gyh89tmJEtsnPqgsE3csDAmkzFky5=yCRuO1JVTQ@mail.gmail.com>
Date: Fri, 15 Apr 2022 16:44:21 -0700
From: Song Liu <song@...nel.org>
To: Kumar Kartikeya Dwivedi <memxor@...il.com>
Cc: Alexander Lobakin <alobakin@...me>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...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>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...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>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Björn Töpel <bjorn@...nel.org>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Dmitrii Dolgov <9erthalion6@...il.com>,
Quentin Monnet <quentin@...valent.com>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Chenbo Feng <fengc@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Daniel Wagner <daniel.wagner@...-carit.de>,
Thomas Graf <tgraf@...g.ch>,
Ong Boon Leong <boon.leong.ong@...el.com>,
linux-perf-users@...r.kernel.org,
open list <linux-kernel@...r.kernel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
llvm@...ts.linux.dev
Subject: Re: [PATCH bpf-next 05/11] samples: bpf: use host bpftool to generate
vmlinux.h, not target
On Fri, Apr 15, 2022 at 6:38 AM Kumar Kartikeya Dwivedi
<memxor@...il.com> wrote:
>
> On Fri, Apr 15, 2022 at 04:15:50AM IST, Alexander Lobakin wrote:
> > Use the host build of bpftool (bootstrap) instead of the target one
> > to generate vmlinux.h/skeletons for the BPF samples. Otherwise, when
> > host != target, samples compilation fails with:
> >
> > /bin/sh: line 1: samples/bpf/bpftool/bpftool: failed to exec: Exec
> > format error
> >
> > Fixes: 384b6b3bbf0d ("samples: bpf: Add vmlinux.h generation support")
> > Signed-off-by: Alexander Lobakin <alobakin@...me>
> > ---
>
> Acked-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
Acked-by: Song Liu <songliubraving@...com>
>
> > samples/bpf/Makefile | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> > index 97203c0de252..02f999a8ef84 100644
> > --- a/samples/bpf/Makefile
> > +++ b/samples/bpf/Makefile
> > @@ -291,12 +291,13 @@ $(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OU
> >
> > BPFTOOLDIR := $(TOOLS_PATH)/bpf/bpftool
> > BPFTOOL_OUTPUT := $(abspath $(BPF_SAMPLES_PATH))/bpftool
> > -BPFTOOL := $(BPFTOOL_OUTPUT)/bpftool
> > +BPFTOOL := $(BPFTOOL_OUTPUT)/bootstrap/bpftool
> > $(BPFTOOL): $(LIBBPF) $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) | $(BPFTOOL_OUTPUT)
> > $(MAKE) -C $(BPFTOOLDIR) srctree=$(BPF_SAMPLES_PATH)/../../ \
> > OUTPUT=$(BPFTOOL_OUTPUT)/ \
> > LIBBPF_OUTPUT=$(LIBBPF_OUTPUT)/ \
> > - LIBBPF_DESTDIR=$(LIBBPF_DESTDIR)/
> > + LIBBPF_DESTDIR=$(LIBBPF_DESTDIR)/ \
> > + bootstrap
> >
> > $(LIBBPF_OUTPUT) $(BPFTOOL_OUTPUT):
> > $(call msg,MKDIR,$@)
> > --
> > 2.35.2
> >
> >
>
> --
> Kartikeya
Powered by blists - more mailing lists