bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, bpf <bpf@vger.kernel.org>,
	Martin Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
	john fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>
Subject: Re: [PATCH bpf-next v3 3/7] tools/bpftool: Fix cross-build
Date: Wed, 11 Nov 2020 12:50:43 -0800	[thread overview]
Message-ID: <CAEf4BzbYcgzbrwS2uH0NDa+0O48BUXvZ0ySV+xcw6-inrro-UA@mail.gmail.com> (raw)
In-Reply-To: <20201110164310.2600671-4-jean-philippe@linaro.org>

On Tue, Nov 10, 2020 at 8:44 AM Jean-Philippe Brucker
<jean-philippe@linaro.org> wrote:
>
> The bpftool build first creates an intermediate binary, executed on the
> host, to generate skeletons required by the final build. When
> cross-building bpftool for an architecture different from the host, the
> intermediate binary should be built using the host compiler (gcc) and
> the final bpftool using the cross compiler (e.g. aarch64-linux-gnu-gcc).
>
> Generate the intermediate objects into the bootstrap/ directory using
> the host toolchain.
>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> v3: Always set LIBBPF_OUTPUT. Tidy the clean recipe.
> ---
>  tools/bpf/bpftool/Makefile | 34 ++++++++++++++++++++++++++--------
>  1 file changed, 26 insertions(+), 8 deletions(-)
>
> diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> index 1358c093b812..d566bced135e 100644
> --- a/tools/bpf/bpftool/Makefile
> +++ b/tools/bpf/bpftool/Makefile
> @@ -19,24 +19,37 @@ BPF_DIR = $(srctree)/tools/lib/bpf/
>  ifneq ($(OUTPUT),)
>    LIBBPF_OUTPUT = $(OUTPUT)/libbpf/
>    LIBBPF_PATH = $(LIBBPF_OUTPUT)
> +  BOOTSTRAP_OUTPUT = $(OUTPUT)/bootstrap/
>  else
> +  LIBBPF_OUTPUT =
>    LIBBPF_PATH = $(BPF_DIR)
> +  BOOTSTRAP_OUTPUT = $(CURDIR)/bootstrap/

This leaves behind bootstrap dir, which is not in .gitignore. Please
follow up with a fix. Thanks!

>  endif
>
>  LIBBPF = $(LIBBPF_PATH)libbpf.a
> +LIBBPF_BOOTSTRAP_OUTPUT = $(BOOTSTRAP_OUTPUT)libbpf/
> +LIBBPF_BOOTSTRAP = $(LIBBPF_BOOTSTRAP_OUTPUT)libbpf.a
>

[...]

  parent reply	other threads:[~2020-11-11 20:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 16:43 [PATCH bpf-next v3 0/7] tools/bpftool: Some build fixes Jean-Philippe Brucker
2020-11-10 16:43 ` [PATCH bpf-next v3 1/7] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions Jean-Philippe Brucker
2020-11-10 16:43 ` [PATCH bpf-next v3 2/7] tools/bpftool: Force clean of out-of-tree build Jean-Philippe Brucker
2020-11-11  4:57   ` Andrii Nakryiko
2020-11-11  8:54     ` Jean-Philippe Brucker
2020-11-11 18:22       ` Andrii Nakryiko
2020-11-10 16:43 ` [PATCH bpf-next v3 3/7] tools/bpftool: Fix cross-build Jean-Philippe Brucker
2020-11-11  5:04   ` Andrii Nakryiko
2020-11-11 20:50   ` Andrii Nakryiko [this message]
2020-11-10 16:43 ` [PATCH bpf-next v3 4/7] tools/runqslower: Use Makefile.include Jean-Philippe Brucker
2020-11-11  5:06   ` Andrii Nakryiko
2020-11-10 16:43 ` [PATCH bpf-next v3 5/7] tools/runqslower: Enable out-of-tree build Jean-Philippe Brucker
2020-11-11  5:11   ` Andrii Nakryiko
2020-11-11  8:53     ` Jean-Philippe Brucker
2020-11-11 18:23       ` Andrii Nakryiko
2020-11-10 16:43 ` [PATCH bpf-next v3 6/7] tools/runqslower: Build bpftool using HOSTCC Jean-Philippe Brucker
2020-11-11  5:11   ` Andrii Nakryiko
2020-11-10 16:43 ` [PATCH bpf-next v3 7/7] tools/bpftool: Fix build slowdown Jean-Philippe Brucker
2020-11-11  5:12   ` Andrii Nakryiko
2020-11-11 20:40 ` [PATCH bpf-next v3 0/7] tools/bpftool: Some build fixes patchwork-bot+netdevbpf

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=CAEf4BzbYcgzbrwS2uH0NDa+0O48BUXvZ0ySV+xcw6-inrro-UA@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jean-philippe@linaro.org \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@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).