1config BR2_PACKAGE_BPFTOOL_ARCH_SUPPORTS
2	bool
3	# see libbpf/src/bpf.c
4	default y if BR2_arc
5	default y if BR2_arm || BR2_armeb
6	default y if BR2_aarch64 || BR2_aarch64_be
7	default y if BR2_i386 || BR2_x86_64
8	default y if BR2_riscv
9	default y if BR2_sparc || BR2_sparc64
10	default y if BR2_s390x
11
12config BR2_PACKAGE_BPFTOOL
13	bool "bpftool"
14	depends on BR2_PACKAGE_BPFTOOL_ARCH_SUPPORTS
15	depends on BR2_TOOLCHAIN_HAS_SYNC_4
16	depends on !BR2_nios2 # binutils
17	depends on BR2_USE_WCHAR # binutils, elfutils
18	depends on !BR2_STATIC_LIBS # elfutils
19	depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
20	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
21	select BR2_PACKAGE_BINUTILS
22	select BR2_PACKAGE_ELFUTILS
23	help
24	  bpftool is a tool for for inspection and simple manipulation
25	  of eBPF programs and maps.
26
27comment "bpftool needs a toolchain w/ wchar, dynamic library, threads, headers >= 4.12"
28	depends on BR2_PACKAGE_BPFTOOL_ARCH_SUPPORTS
29	depends on BR2_TOOLCHAIN_HAS_SYNC_4
30	depends on !BR2_nios2
31	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
32		|| !BR2_TOOLCHAIN_HAS_THREADS \
33		|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
34