Re: [PATCH v2 4/4] objtool: Add explicitly sequenced -lzstd to libopcodes fallback
From: bot+bpf-ci
Date: Wed Sep 09 2026 - 17:35:39 EST
> commit 1f030996083bc0f6f03bca8dc04fe12feb66957d
> Author: Ian Rogers <irogers@xxxxxxxxxx>
> Date: Wed Sep 9 13:41:22 2026 -0700
>
> objtool: Add explicitly sequenced -lzstd to libopcodes fallback
>
> Distributions like Fedora currently ship a statically compiled binutils
> libbfd (an intrinsic dependency of libopcodes) that internally utilizes
> zstd to decompress sections.
>
> Because objtool resolves host dependencies sequentially via a manual HOSTCC
> shell loop, build failures will occur (e.g. undefined reference to
> 'ZSTD_decompress') unless the loop probes for it.
>
> Add the '-lopcodes -lbfd -liberty -lz -lzstd' combination to the fallback
> chain, assuring successful compilation on hosts packaging static binutils.
This isn't a bug, but could the changelog say the new candidate mirrors the
existing -lz fallback (and note it is untested, as the cover letter does)
rather than stating it assures a successful build?
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> Assisted-by: Antigravity:gemini-3.1-pro
>
> diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> index a4484fd22a96..141b957c566b 100644
> --- a/tools/objtool/Makefile
> +++ b/tools/objtool/Makefile
> @@ -88,7 +88,8 @@ LIBOPCODES_LIBS := $(shell \
> for libs in "-lopcodes" \
> "-lopcodes -lbfd" \
> "-lopcodes -lbfd -liberty" \
> - "-lopcodes -lbfd -liberty -lz"; do \
> + "-lopcodes -lbfd -liberty -lz" \
> + "-lopcodes -lbfd -liberty -lz -lzstd"; do \
> echo 'extern void disassemble_init_for_target(void *);' \
> 'int main(void) { disassemble_init_for_target(0); return 0; }' | \
> $(HOSTCC) -xc - -o /dev/null $$libs 2>/dev/null && \
This isn't a bug, but should the comment above the loop also mention libzstd,
so the documented dependency list still matches the candidates below it? The
comment currently says "libbfd, libiberty, and sometimes libz" but the new
candidate includes libzstd as well.
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/34404437407