From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: "Björn Töpel" <bjorn@kernel.org>,
bpf@vger.kernel.org, linux-perf-users@vger.kernel.org,
"Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Jean-Philippe Brucker" <jean-philippe@linaro.org>,
"Quentin Monnet" <qmo@kernel.org>,
"Andrii Nakryiko" <andrii.nakryiko@gmail.com>
Cc: "Björn Töpel" <bjorn@rivosinc.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
"David Abdurachmanov" <davidlt@rivosinc.com>,
"Namhyung Kim" <namhyung@kernel.org>
Subject: Re: [PATCH bpf v2] tools: Override makefile ARCH variable if defined, but empty
Date: Thu, 28 Nov 2024 14:07:20 +0100 [thread overview]
Message-ID: <87o71zik1j.fsf@toke.dk> (raw)
In-Reply-To: <20241127101748.165693-1-bjorn@kernel.org>
Björn Töpel <bjorn@kernel.org> writes:
> From: Björn Töpel <bjorn@rivosinc.com>
>
> There are a number of tools (bpftool, selftests), that require a
> "bootstrap" build. Here, a bootstrap build is a build host variant of
> a target. E.g., assume that you're performing a bpftool cross-build on
> x86 to riscv, a bootstrap build would then be an x86 variant of
> bpftool. The typical way to perform the host build variant, is to pass
> "ARCH=" in a sub-make. However, if a variable has been set with a
> command argument, then ordinary assignments in the makefile are
> ignored.
>
> This side-effect results in that ARCH, and variables depending on ARCH
> are not set.
>
> Workaround by overriding ARCH to the host arch, if ARCH is empty.
>
> Fixes: 8859b0da5aac ("tools/bpftool: Fix cross-build")
> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> Reviewed-by: Namhyung Kim <namhyung@kernel.org>
> Acked-by: Quentin Monnet <qmo@kernel.org>
> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: "Björn Töpel" <bjorn@kernel.org>,
bpf@vger.kernel.org, linux-perf-users@vger.kernel.org,
"Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Jean-Philippe Brucker" <jean-philippe@linaro.org>,
"Quentin Monnet" <qmo@kernel.org>,
"Andrii Nakryiko" <andrii.nakryiko@gmail.com>
Cc: "Björn Töpel" <bjorn@rivosinc.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
"David Abdurachmanov" <davidlt@rivosinc.com>,
"Namhyung Kim" <namhyung@kernel.org>
Subject: Re: [PATCH bpf v2] tools: Override makefile ARCH variable if defined, but empty
Date: Thu, 28 Nov 2024 14:07:20 +0100 [thread overview]
Message-ID: <87o71zik1j.fsf@toke.dk> (raw)
In-Reply-To: <20241127101748.165693-1-bjorn@kernel.org>
Björn Töpel <bjorn@kernel.org> writes:
> From: Björn Töpel <bjorn@rivosinc.com>
>
> There are a number of tools (bpftool, selftests), that require a
> "bootstrap" build. Here, a bootstrap build is a build host variant of
> a target. E.g., assume that you're performing a bpftool cross-build on
> x86 to riscv, a bootstrap build would then be an x86 variant of
> bpftool. The typical way to perform the host build variant, is to pass
> "ARCH=" in a sub-make. However, if a variable has been set with a
> command argument, then ordinary assignments in the makefile are
> ignored.
>
> This side-effect results in that ARCH, and variables depending on ARCH
> are not set.
>
> Workaround by overriding ARCH to the host arch, if ARCH is empty.
>
> Fixes: 8859b0da5aac ("tools/bpftool: Fix cross-build")
> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> Reviewed-by: Namhyung Kim <namhyung@kernel.org>
> Acked-by: Quentin Monnet <qmo@kernel.org>
> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-11-28 13:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 10:17 [PATCH bpf v2] tools: Override makefile ARCH variable if defined, but empty Björn Töpel
2024-11-27 10:17 ` Björn Töpel
2024-11-27 11:53 ` Jiri Olsa
2024-11-27 11:53 ` Jiri Olsa
2024-11-28 13:07 ` Toke Høiland-Jørgensen [this message]
2024-11-28 13:07 ` Toke Høiland-Jørgensen
2024-11-29 16:20 ` patchwork-bot+netdevbpf
2024-11-29 16:20 ` patchwork-bot+netdevbpf
2024-12-11 22:32 ` patchwork-bot+linux-riscv
2024-12-11 22:32 ` patchwork-bot+linux-riscv
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=87o71zik1j.fsf@toke.dk \
--to=toke@redhat.com \
--cc=acme@redhat.com \
--cc=alexghiti@rivosinc.com \
--cc=andrii.nakryiko@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=bpf@vger.kernel.org \
--cc=davidlt@rivosinc.com \
--cc=jean-philippe@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=namhyung@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=qmo@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.