build: bpf: fix LLVM tool paths with host toolchain
authorMatthias Schiffer <[email protected]>
Sat, 5 Apr 2025 10:23:44 +0000 (12:23 +0200)
committerMatthias Schiffer <[email protected]>
Wed, 9 Apr 2025 16:30:49 +0000 (18:30 +0200)
commita51b1a98e026887ea4dd8f09a6fdc8138941e2ac
tree543d1d28f311f3841f3d9094260189c75c8136fa
parentdc7933e77fcc7a388dfa2785b57b5b7c46b8a588
build: bpf: fix LLVM tool paths with host toolchain

Do not assume that the various tools like llc can be found under the
same path as clang; instead, look them up through BPF_PATH (while still
preferring ones found next to clang).

This fixes build in common setups with ccache, where clang resolves to a
path like /usr/lib/ccache/bin/clang, but no other tools can be found at
that location.

Signed-off-by: Matthias Schiffer <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko <[email protected]>
(cherry picked from commit 89f1d56a7eab7d530be4bbb5cf21dfc80b3485b1)
include/bpf.mk