From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: "Jiri Olsa" <olsajiri@gmail.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
linux-kernel@vger.kernel.org, "Björn Töpel" <bjorn@rivosinc.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Tom Rix" <trix@redhat.com>,
bpf@vger.kernel.org, "Anders Roxell" <anders.roxell@linaro.org>,
llvm@lists.linux.dev
Subject: Re: [PATCH v2] tools/build: Add clang cross-compilation flags to feature detection
Date: Mon, 29 Apr 2024 18:11:45 +0100 [thread overview]
Message-ID: <20240429171145.GA241057@myrica> (raw)
In-Reply-To: <87o79wxvnu.fsf@all.your.base.are.belong.to.us>
On Fri, Apr 26, 2024 at 12:31:17PM +0200, Björn Töpel wrote:
> Jiri Olsa <olsajiri@gmail.com> writes:
>
> > On Thu, Nov 02, 2023 at 11:32:52AM +0100, Björn Töpel wrote:
> >> From: Björn Töpel <bjorn@rivosinc.com>
> >>
> >> When a tool cross-build has LLVM=1 set, the clang cross-compilation
> >> flags are not passed to the feature detection build system. This
> >> results in the host's features are detected instead of the targets.
> >>
> >> E.g, triggering a cross-build of bpftool:
> >>
> >> cd tools/bpf/bpftool
> >> make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- LLVM=1
> >>
> >> would report the host's, and not the target's features.
> >>
> >> Correct the issue by passing the CLANG_CROSS_FLAGS variable to the
> >> feature detection makefile.
> >>
> >> Fixes: cebdb7374577 ("tools: Help cross-building with clang")
> >> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
> >
> > Acked-by: Jiri Olsa <jolsa@kernel.org>
>
> Waking up the dead!
>
> Arnaldo, Jean-Philippe: I'm still stung by what this patch fixes. LMK
> what you need from me/this patch to pick it up.
I guess the problem is these files don't have a specific tree. Since you
mention BPF maybe it should go through the BPF tree, in which case you
could resend to the tools/bpf maintainers (and "PATCH bpf" subject prefix)
FWIW the change looks good to me:
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
next prev parent reply other threads:[~2024-04-29 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 10:32 [PATCH v2] tools/build: Add clang cross-compilation flags to feature detection Björn Töpel
2023-11-02 12:30 ` Jiri Olsa
2024-04-26 10:31 ` Björn Töpel
2024-04-29 17:11 ` Jean-Philippe Brucker [this message]
2024-05-02 21:07 ` Björn Töpel
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=20240429171145.GA241057@myrica \
--to=jean-philippe@linaro.org \
--cc=acme@redhat.com \
--cc=anders.roxell@linaro.org \
--cc=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=bpf@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=olsajiri@gmail.com \
--cc=trix@redhat.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