Re: [PATCH] perf build: Support passing extra Clang options via EXTRA_BPF_FLAGS

From: Leo Yan

Date: Mon Oct 20 2025 - 09:50:14 EST


Hi hupu,

On Mon, Oct 20, 2025 at 08:51:52PM +0800, hupu wrote:

[...]

> > To be clear, now we are not talking cross build for perf program or any
> > targeting a CPU arch, it is a build failure for eBPF program.
> >
>
> I’d like to clarify the background and scenario once more:
> I’m building an SDK that includes a cross-compilation toolchain for
> the target architecture along with a copy of the kernel source tree.

I am not preventing to use toolchains in you mentioned SDK. I just
prefer to give priority the headers provided by the kernel source.

Seems to me, a more reasonable series would be:

- Fix the eBPF program build with using self-contained headers;
- Extend to support external headers.

Thanks,
Leo