linux/tools/bpf/bpftool
Ihor Solodrai 08a7491843 bpftool: Fix dependencies for static build
When building selftests/bpf with EXTRA_LDFLAGS=-static the follwoing
error happens:

  LINK    /ws/linux/tools/testing/selftests/bpf/tools/build/bpftool/bootstrap/bpftool
/usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-dso_dlfcn.o): in function `dlfcn_globallookup':
   [...]
/usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_expand_block':
(.text+0xc64): undefined reference to `uncompress'
/usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zlib.o): in function `zlib_oneshot_compress_block':
(.text+0xce4): undefined reference to `compress'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:252: /ws/linux/tools/testing/selftests/bpf/tools/build/bpftool/bootstrap/bpftool] Error 1
make: *** [Makefile:327: /ws/linux/tools/testing/selftests/bpf/tools/sbin/bpftool] Error 2
make: *** Waiting for unfinished jobs....

This is caused by wrong order of dependencies in the Makefile. Fix it.

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260128211255.376933-1-ihor.solodrai@linux.dev
2026-01-28 13:26:41 -08:00
..
Documentation bpftool: Add 'prepend' option for tcx attach to insert at chain start 2026-01-16 14:51:23 -08:00
bash-completion bpftool: Add 'prepend' option for tcx attach to insert at chain start 2026-01-16 14:51:23 -08:00
skeleton
.gitignore
Makefile bpftool: Fix dependencies for static build 2026-01-28 13:26:41 -08:00
btf.c
btf_dumper.c bpftool: Fix missing closing parethesis for BTF_KIND_UNKN 2025-10-28 09:00:55 -07:00
cfg.c
cfg.h
cgroup.c bpftool: Add support for signing BPF programs 2025-09-22 19:17:55 -07:00
common.c bpftool: add fsession support 2026-01-24 18:49:36 -08:00
feature.c
gen.c bpftool: Make skeleton C++ compatible with explicit casts 2026-01-09 11:01:54 -08:00
iter.c
jit_disasm.c
json_writer.c
json_writer.h
link.c
main.c bpftool: Add support for signing BPF programs 2025-09-22 19:17:55 -07:00
main.h bpftool: Add support for signing BPF programs 2025-09-22 19:17:55 -07:00
map.c bpftool: Recognize insn_array map type 2025-11-05 17:31:25 -08:00
map_perf_ring.c
net.c bpftool: Add 'prepend' option for tcx attach to insert at chain start 2026-01-16 14:51:23 -08:00
netlink_dumper.c
netlink_dumper.h
perf.c
pids.c
prog.c bpftool: Add support for signing BPF programs 2025-09-22 19:17:55 -07:00
sign.c bpftool: Allow bpftool to build with openssl < 3 2025-11-24 10:00:16 -08:00
struct_ops.c
token.c bpftool: Fix UAF in get_delegate_value 2025-09-19 15:37:30 -07:00
tracelog.c
xlated_dumper.c
xlated_dumper.h