mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: irogers@google.com,peterz@infradead.org,mingo@redhat.com,acme@kernel.org,namhyung@kernel.org,jolsa@kernel.org,irogers@google.com,adrian.hunter@intel.com,qmo@kernel.org,jpoimboe@kernel.org
Cc: daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,james.clark@linaro.org,leo.yan@arm.com,linux-perf-users@vger.kernel.org,bpf@vger.kernel.org,linux-kernel@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH v3 1/4] tools build: Add explicitly sequenced -lzstd to libbfd feature fallback
Date: Wed,  4 Nov 2026 05:03:56 +0000 (UTC)	[thread overview]
Message-ID: <d94520950f855a1d5ac4b51975988b70185ba7da61836aa84b044b69e8104bbc@mail.kernel.org> (raw)
In-Reply-To: <20261104043006.1199857-2-irogers@google.com>

[-- Attachment #1: Type: text/plain, Size: 2680 bytes --]

> tools build: Add explicitly sequenced -lzstd to libbfd feature fallback

TL;DR: Possible build break at this commit: the libbfd -lzstd fallback is
removed but no consumer uses the new feature test yet, so perf may fail to
link and bpftool may lose JIT disassembly.

> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile

[ ... ]

> @@ -249,18 +250,21 @@ $(OUTPUT)test-python-module.bin:
>  	$(BUILD) $(FLAGS_PYTHON_EMBED)
>  
>  $(OUTPUT)test-libbfd.bin:
> -	$(BUILD_BFD) || $(BUILD_BFD) -lzstd
> +	$(BUILD_BFD)
>  
>  $(OUTPUT)test-libbfd-threadsafe.bin:
> -	$(BUILD_BFD) || $(BUILD_BFD) -lzstd || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz
> +	$(BUILD_BFD) || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz || \
> +	$(BUILD_BFD) -liberty -lz -lzstd

Can this leave perf and bpftool unable to link libbfd at this commit?

Nothing here reads the new libbfd-liberty-z-zstd result.  Neither
tools/perf/Makefile.config nor tools/bpf/bpftool/Makefile calls
feature_check for it or has a branch that uses it.

On a system where "-lbfd -ldl" fails but "-lbfd -ldl -lzstd" links, the
parent commit gave feature-libbfd=1 through the removed fallback.  Here
feature-libbfd, feature-libbfd-liberty and feature-libbfd-liberty-z are
all 0, while feature-libbfd-threadsafe is 1 through the new
"-liberty -lz -lzstd" fallback.

With BUILD_NONDISTRO=1, perf's Makefile.config then passes the threadsafe
check but takes none of the EXTLIBS branches:

  ifeq ($(feature-libbfd), 1)
    EXTLIBS += -lbfd -lopcodes
  else ifeq ($(feature-libbfd-liberty), 1)
    EXTLIBS += -lbfd -lopcodes -liberty
  else ifeq ($(feature-libbfd-liberty-z), 1)
    EXTLIBS += -lbfd -lopcodes -liberty -lz
  endif

  CFLAGS += -DHAVE_LIBBFD_SUPPORT

util/libbfd.o is still built, so the perf link can fail with undefined
references to bfd_openr(), bfd_check_format() and disassembler().  bpftool
goes down the same chain, silently drops -lbfd and -DHAVE_LIBBFD_SUPPORT,
and loses JIT disassembly.

The consumers are added later in the series:

  6eb66acc776f ("perf build: Add explicitly sequenced -lzstd to libbfd
  feature fallback")
  155513d3a59d ("bpftool: Add explicitly sequenced -lzstd to libbfd
  feature fallback")

Would it be better to keep the old -lzstd fallback until those consumers
land, or to reorder or squash so that each commit remains buildable?


---
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/41774922004

  reply	other threads:[~2026-11-04  5:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  4:30 [PATCH v3 0/4] tools build: Fixes for libbfd -lzstd dependency Ian Rogers
2026-11-04  4:30 ` [PATCH v3 1/4] tools build: Add explicitly sequenced -lzstd to libbfd feature fallback Ian Rogers
2026-11-04  5:03   ` bot+bpf-ci [this message]
2026-11-04  4:30 ` [PATCH v3 2/4] perf " Ian Rogers
2026-11-04  4:30 ` [PATCH v3 3/4] bpftool: " Ian Rogers
2026-11-04  4:30 ` [PATCH v3 4/4] objtool: Add explicitly sequenced -lzstd to libopcodes fallback Ian Rogers

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=d94520950f855a1d5ac4b51975988b70185ba7da61836aa84b044b69e8104bbc@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.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@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qmo@kernel.org \
    --cc=song@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®