From: Quentin Monnet <qmo@kernel.org>
To: Ian Rogers <irogers@google.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Nick Terrell <terrelln@fb.com>, David Sterba <dsterba@suse.com>,
Tomas Glozar <tglozar@redhat.com>,
Costa Shulyupin <costa.shul@redhat.com>,
Michael Jeanson <mjeanson@efficios.com>,
Dmitrii Dolgov <9erthalion6@gmail.com>, Leo Yan <leo.yan@arm.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v2 3/4] bpftool: Add explicitly sequenced -lzstd to libbfd feature fallback
Date: Thu, 10 Sep 2026 10:20:46 +0100 [thread overview]
Message-ID: <36a64b34-bb69-4352-9e84-c31d0793b6a4@kernel.org> (raw)
In-Reply-To: <20260909204122.1993010-4-irogers@google.com>
On 09/09/2026 21:41, Ian Rogers wrote:
> Distributions like Fedora currently ship a statically compiled binutils
> libbfd that natively depends on zstd to decompress sections (e.g.
> undefined reference to 'ZSTD_decompress').
>
> Extend the newly supplemented libbfd-liberty-z-zstd feature probe into
> bpftool's Makefile so it can natively build against static binutils
> distributions.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> Assisted-by: Antigravity:gemini-3.1-pro
> ---
> tools/bpf/bpftool/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> index b0f7168e7943..1cac4508eb0c 100644
> --- a/tools/bpf/bpftool/Makefile
> +++ b/tools/bpf/bpftool/Makefile
> @@ -125,6 +125,7 @@ FEATURE_TESTS += libcap
> FEATURE_TESTS += libbfd
> FEATURE_TESTS += libbfd-liberty
> FEATURE_TESTS += libbfd-liberty-z
> +FEATURE_TESTS += libbfd-liberty-z-zstd
> FEATURE_TESTS += disassembler-four-args
> FEATURE_TESTS += disassembler-init-styled
> FEATURE_TESTS += libelf-zstd
> @@ -135,6 +136,7 @@ FEATURE_DISPLAY += libcap
> FEATURE_DISPLAY += libbfd
> FEATURE_DISPLAY += libbfd-liberty
> FEATURE_DISPLAY += libbfd-liberty-z
> +FEATURE_DISPLAY += libbfd-liberty-z-zstd
> endif
>
> check_feat := 1
> @@ -201,6 +203,8 @@ else
> LIBS += -lbfd -ldl -lopcodes -liberty
> else ifeq ($(feature-libbfd-liberty-z),1)
> LIBS += -lbfd -ldl -lopcodes -liberty -lz
> + else ifeq ($(feature-libbfd-liberty-z-zstd),1)
> + LIBS += -lbfd -ldl -lopcodes -liberty -lz -lzstd
> endif
>
> # If one of the above feature combinations is set, we support libbfd
Hi Ian, thanks for this!
Just checking: my understanding is that if libbfd depends on libzstd,
then it always also depends on zlib, so we never need to check some
variant such as "feature-libbfd-liberty-zstd" (without the "-z"), is
this correct?
Quentin
next prev parent reply other threads:[~2026-09-10 9:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 20:41 [PATCH v2 0/4] tools build: Fixes for libbfd -lzstd dependency Ian Rogers
2026-09-09 20:41 ` [PATCH v2 1/4] tools build: Add explicitly sequenced -lzstd to libbfd feature fallback Ian Rogers
2026-09-09 20:49 ` sashiko-bot
2026-09-09 20:41 ` [PATCH v2 2/4] perf " Ian Rogers
2026-09-09 20:48 ` sashiko-bot
2026-09-09 20:41 ` [PATCH v2 3/4] bpftool: " Ian Rogers
2026-09-09 20:44 ` sashiko-bot
2026-09-09 21:30 ` bot+bpf-ci
2026-09-10 9:20 ` Quentin Monnet [this message]
2026-09-10 15:37 ` Ian Rogers
2026-09-10 19:53 ` Quentin Monnet
2026-09-09 20:41 ` [PATCH v2 4/4] objtool: Add explicitly sequenced -lzstd to libopcodes fallback Ian Rogers
2026-09-09 20:45 ` sashiko-bot
2026-09-09 21:30 ` bot+bpf-ci
2026-09-09 22:06 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36a64b34-bb69-4352-9e84-c31d0793b6a4@kernel.org \
--to=qmo@kernel.org \
--cc=9erthalion6@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=costa.shul@redhat.com \
--cc=daniel@iogearbox.net \
--cc=dsterba@suse.com \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=mingo@redhat.com \
--cc=mjeanson@efficios.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=song@kernel.org \
--cc=terrelln@fb.com \
--cc=tglozar@redhat.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.