Skip to content

tools/bpf: allow building with musl

Dominique Martinet bpf lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review 2 of 4 applied

Patches in v1 2 of 4 applied

#Subject and filesSizeRepliesApplied
1/4tools/bpf/runqslower: musl compat: explicitly link with libargp if foundtools/bpf/runqslower/Makefile tools/build/feature/Makefile tools/build/feature/test-all.c +1 more+51 -13 replies
2/4tools/bpf: musl compat: do not use DEFFILEMODEtools/bpf/bpf_jit_disasm.c+1 -10 replies
3/4tools/bpf: musl compat: replace nftw with FTW_ACTIONRETVALtools/bpf/bpftool/perf.c+59 -571 replyApplied
4/4tools/bpf: replace sys/fcntl.h by fcntl.htools/bpf/bpftool/tracelog.c+1 -11 replyApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchQuentin Monnet
1/4
2/4
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] tools/bpf: allow building with musl

Hi,

I'd like to build bpftool on alpine linux, which is musl based.

There are a few incompatibilities with it, I've commented on each patch when I could think of alternative solutions.

I've tested the patch on an x86_64 debian testing with no problem, so didn't obviously break glibc builds, and the binaries built for alpine seem to work on aarch64 as well.

Dominique Martinet (4):
tools/runqslower: musl compat: explicitly link with libargp if found tools/bpf: musl compat: do not use DEFFILEMODE
tools/bpf: musl compat: replace nftw with FTW_ACTIONRETVAL tools/bpf: replace sys/fcntl.h by fcntl.h

 tools/bpf/bpf_jit_disasm.c         |   2 +-
 tools/bpf/bpftool/perf.c           | 115 +++++++++++++++--------------
 tools/bpf/bpftool/tracelog.c       |   2 +-
 tools/bpf/runqslower/Makefile      |  30 +++++++-
 tools/build/feature/Makefile       |   4 +
 tools/build/feature/test-all.c     |   4 +
 tools/build/feature/test-libargp.c |  14 ++++
 7 files changed, 111 insertions(+), 60 deletions(-)
 create mode 100644 tools/build/feature/test-libargp.c
Signature · 1 line
2.35.1