[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251211103957.GA4048253@e132581.arm.com>
Date: Thu, 11 Dec 2025 10:39:57 +0000
From: Leo Yan <leo.yan@....com>
To: hupu <hupu.gm@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>, acme@...nel.org,
adrian.hunter@...el.com, alexander.shishkin@...ux.intel.com,
irogers@...gle.com, jolsa@...nel.org, justinstitt@...gle.com,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
mark.rutland@....com, mingo@...hat.com, morbo@...gle.com,
nathan@...nel.org, nick.desaulniers+lkml@...il.com,
peterz@...radead.org
Subject: Re: [PATCH] perf build: Support passing extra Clang options via
EXTRA_BPF_FLAGS
On Wed, Nov 26, 2025 at 09:44:02PM +0800, hupu wrote:
Please don't spam on mailing list as you did. It is really bad practice.
You could find resources [1][2] to learn upstreaming and co-work on the
ML.
> The eBPF skeleton is compiled via clang --target=bpf, and its header
> file search paths mainly come from BPF_INCLUDE and TOOLS_UAPI_INCLUDE.
> It also uses '-idirafter' to include the host’s /usr/local/include and
> /usr/include directories in the search path. This process is not
> directly coupled with cross-compilation managed via pkg-config, which
> means PKG_CONFIG_SYSROOT_DIR does not affect how the skeleton resolves
> its headers.
Based on my limited knowledge, Clang does not provide its own headers.
It needs to rely on GCC's headers for compilation. I do see the
Makefile does right thing for finding headers:
Makefile.perf:1203: ***
CLANG_SYS_INCLUDES=-idirafter /usr/lib/llvm-18/lib/clang/18/include
-idirafter /usr/local/include
-idirafter /usr/bin/../lib/gcc-cross/aarch64-linux-gnu/14/../../../../aarch64-linux-gnu/include
-idirafter /usr/include/aarch64-linux-gnu
-idirafter /usr/include
It is mess to add some random include paths and feed to clang. We
already have provided a reliable way for building eBPF skelton program
- keep in mind, eBPF skeleton program is not any aarch64 cross
compilation, we just use clang for building bpf target.
My understanding is you don't have a sane setting up on your local
building env.
Thanks,
Leo
[1] https://static.linaro.org/connect/hkg18/presentations/hkg18-tr02.pdf
[2] https://static.linaro.org/connect/hkg18/presentations/hkg18-tr03.pdf
Powered by blists - more mailing lists