Re: [PATCH] tools/build: Use SYSTEM_BPFTOOL for system bpftool
From: Quentin Monnet
Date: Wed Mar 26 2025 - 06:00:09 EST
2025-03-26 01:40 UTC+0100 ~ Tomas Glozar <tglozar@xxxxxxxxxx>
> The feature test for system bpftool uses BPFTOOL as the variable to set
> its path, defaulting to just "bpftool" if not set by the user.
>
> This conflicts with selftests and a few other utilities, which expect
> BPFTOOL to be set to the in-tree bpftool path by default. For example,
> bpftool selftests fail to build:
>
> $ make -C tools/testing/selftests/bpf/
> make: Entering directory '/home/tglozar/dev/linux/tools/testing/selftests/bpf'
>
> make: *** No rule to make target 'bpftool', needed by '/home/tglozar/dev/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h'. Stop.
> make: Leaving directory '/home/tglozar/dev/linux/tools/testing/selftests/bpf'
>
> Fix the problem by renaming the variable used for system bpftool from
> BPFTOOL to SYSTEM_BPFTOOL, so that the new usage does not conflict with
> the existing one of BPFTOOL.
>
> Reported-by: Venkat Rao Bagalkote <venkat88@xxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/linux-kernel/5df6968a-2e5f-468e-b457-fc201535dd4c@xxxxxxxxxxxxx/
> Suggested-by: Quentin Monnet <qmo@xxxxxxxx>
Let's use <qmo@xxxxxxxxxx> if possible, please.
> Fixes: 8a635c3856dd ("tools/build: Add bpftool-skeletons feature test")
> Signed-off-by: Tomas Glozar <tglozar@xxxxxxxxxx>
Looks good, thanks a lot!
Acked-by: Quentin Monnet <qmo@xxxxxxxxxx>