Skip to content

tools build: Fixes for libbfd -lzstd dependency

Ian Rogers bpf linux-perf-users lkml 3 versions – Applied

Status from this message: Applied to perf-tools-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 5 repliesApplied
  2. v24 patches 4 repliesSuperseded
  3. v11 patch 0 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4tools build: Add explicitly sequenced -lzstd to libbfd feature fallbacktools/build/Makefile.feature tools/build/feature/Makefile+15 -72 replies
2/4perf build: Add explicitly sequenced -lzstd to libbfd feature fallbacktools/perf/Makefile.config+3 -00 replies
3/4bpftool: Add explicitly sequenced -lzstd to libbfd feature fallbacktools/bpf/bpftool/Makefile+4 -00 replies
4/4objtool: Add explicitly sequenced -lzstd to libopcodes fallbacktools/objtool/Makefile+4 -30 replies

Reviews trailers per patch

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

PatchQuentin MonnetPeter Zijlstra (Intel)
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 v3 thread

Cover letter [PATCH v3 0/4] tools build: Fixes for libbfd -lzstd dependency

This series addresses build problems when linking against static libbfd/libopcodes on distributions like Fedora where binutils is built with zstd section decompression support (requiring '-liberty -lz -lzstd' together).

In v2, commit 89d001d48ec7 ("tools build: Add zstd to the binutils library feature tests") landed in tools/build/feature/Makefile at the same time, creating a merge conflict and only adding '|| $(BUILD_BFD) -lzstd' without '-liberty -lz' or the corresponding libbfd-liberty-z-zstd feature check in perf and bpftool (so even if test-libbfd.bin passed with -lzstd, perf and bpftool would link only '-lbfd -lopcodes' without '-lzstd').

v3 rebases onto perf-tools-next (v7.4-rc1), fixes commit 89d001d48ec7 in patch 1/4, collects the Acked-by tags from Quentin Monnet and Peter Zijlstra, updates the LIBOPCODES_LIBS comment in tools/objtool/Makefile, and moves the AI assistance disclosure from commit trailers to the cover letter.

v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/linux-perf-users/[email protected]/

AI Assistance Disclosure (per Documentation/process/coding-assistants.rst):
- Tools used: Antigravity coding assistant and Sashiko automated patch review.
- Summary of prompts and assistance: Rebased the 4-patch series onto perf-tools-next, resolved the conflict with commit 89d001d48ec7 in tools/build/feature/Makefile, incorporated review feedback and Acked-by tags, and verified with scripts/checkpatch.pl.

Ian Rogers (4):
tools build: Add explicitly sequenced -lzstd to libbfd feature
fallback
perf build: Add explicitly sequenced -lzstd to libbfd feature fallback
bpftool: Add explicitly sequenced -lzstd to libbfd feature fallback
objtool: Add explicitly sequenced -lzstd to libopcodes fallback

 tools/bpf/bpftool/Makefile   |  4 ++++
 tools/build/Makefile.feature |  3 ++-
 tools/build/feature/Makefile | 19 +++++++++++++------
 tools/objtool/Makefile       |  7 ++++---
 tools/perf/Makefile.config   |  3 +++
 5 files changed, 26 insertions(+), 10 deletions(-)
Signature · 1 line
2.56.0.385.gac671c819a-goog