mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 08:01:59 +00:00
edd75c8028
Building BPF selftests with custom HOSTCFLAGS yields an error:
# make HOSTCFLAGS="-O2"
[...]
HOSTCC ./tools/testing/selftests/bpf/tools/build/resolve_btfids/main.o
main.c:73:10: fatal error: linux/rbtree.h: No such file or directory
73 | #include <linux/rbtree.h>
| ^~~~~~~~~~~~~~~~
The reason is that tools/bpf/resolve_btfids/Makefile passes header
include paths by extending HOSTCFLAGS which is overridden by setting
HOSTCFLAGS in the make command (because of Makefile rules [1]).
This patch fixes the above problem by passing the include paths via
`HOSTCFLAGS_resolve_btfids` which is used by tools/build/Build.include
and can be combined with overridding HOSTCFLAGS.
[1] https://www.gnu.org/software/make/manual/html_node/Overriding.html
Fixes:
|
||
---|---|---|
.. | ||
bpftool | ||
resolve_btfids | ||
runqslower | ||
.gitignore | ||
bpf_asm.c | ||
bpf_dbg.c | ||
bpf_exp.l | ||
bpf_exp.y | ||
bpf_jit_disasm.c | ||
Makefile |