public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/5] perf build: nondistro build tidyups
@ 2025-12-23 17:00 James Clark
  2025-12-23 17:00 ` [PATCH 1/5] perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting James Clark
  2026-01-06 22:18 ` [PATCH 0/5] perf build: nondistro build tidyups Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 3+ messages in thread
From: James Clark @ 2025-12-23 17:00 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Leo Yan, Justin Stitt
  Cc: linux-perf-users, linux-kernel, Roberto Sassu, Alexei Starovoitov,
	Andres Freund, Andrii Nakryiko, Daniel Borkmann, John Fastabend,
	KP Singh, Martin KaFai Lau, Nick Terrell, Song Liu, bpf, llvm,
	Arnaldo Carvalho de Melo, James Clark, Nick Desaulniers,
	Quentin Monnet, Stanislav Fomichev

nondistro builds now require a specific version of libbfd, so this adds
an error when doing an explicit BUILD_NONDISTRO build and some other
related tidyups.

I'm not sure if the intention is to skip build-tests if something is
missing, but I see it was done for libbpf versions, so I added the same
for libbfd. This is the main thing that I hit, that build-test all of a
sudden stopped working for me.

The first commit is also a cherry pick of an old commit that seemed to
have been accidentally reverted in the unrelated change linked in the
trailers.

---
James Clark (4):
      perf build: Do all non-distro feature checks in one go
      perf build: Remove unused libbfd-buildid feature test
      perf build: Feature test for libbfd thread safety API
      perf build: Skip nondistro build test if libbfd is old

Roberto Sassu (1):
      perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting

 tools/build/Makefile.feature                 |  2 +-
 tools/build/feature/Makefile                 |  4 +--
 tools/build/feature/test-libbfd-buildid.c    |  8 -----
 tools/build/feature/test-libbfd-threadsafe.c | 18 ++++++++++
 tools/perf/Makefile.config                   | 54 ++++++++++------------------
 tools/perf/tests/make                        |  5 +++
 6 files changed, 45 insertions(+), 46 deletions(-)
---
base-commit: cbd41c6d4c26c161a2b0e70ad411d3885ff13507
change-id: 20251223-james-libbfd-feat-check-e0cd09d2c1e1

Best regards,
-- 
James Clark <james.clark@linaro.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/5] perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting
  2025-12-23 17:00 [PATCH 0/5] perf build: nondistro build tidyups James Clark
@ 2025-12-23 17:00 ` James Clark
  2026-01-06 22:18 ` [PATCH 0/5] perf build: nondistro build tidyups Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 3+ messages in thread
From: James Clark @ 2025-12-23 17:00 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Leo Yan, Justin Stitt
  Cc: linux-perf-users, linux-kernel, Roberto Sassu, Alexei Starovoitov,
	Andres Freund, Andrii Nakryiko, Daniel Borkmann, John Fastabend,
	KP Singh, Martin KaFai Lau, Nick Terrell, Song Liu, bpf, llvm,
	Arnaldo Carvalho de Melo, James Clark, Nick Desaulniers,
	Quentin Monnet, Stanislav Fomichev

From: Roberto Sassu <roberto.sassu@huawei.com>

As the building mechanism is now able to retry detection with different
combinations of linking flags, setting
FEATURE_CHECK_LDFLAGS-disassembler-four-args and
FEATURE_CHECK_LDFLAGS-disassembler-init-styled is not necessary anymore,
so remove it.

Committer notes:

Use the same technique to find the set of bfd-related libraries to link as in:

  3308ffc5016e6136 ("tools, build: Retry detection of bfd-related features")

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Monnet <quentin@isovalent.com>
Cc: Song Liu <song@kernel.org>
Cc: Stanislav Fomichev <sdf@google.com>
Cc: bpf@vger.kernel.org
Cc: llvm@lists.linux.dev
Link: https://lore.kernel.org/r/20220719170555.2576993-3-roberto.sassu@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[Cherry pick to fix accidental removal in commit ad5f604e186a]
Signed-off-by: James Clark <james.clark@linaro.org>
---
 tools/perf/Makefile.config | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index bd9f4804d56b..ea6636a09a95 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -379,8 +379,8 @@ ifneq ($(TCMALLOC),)
 endif
 
 ifeq ($(FEATURES_DUMP),)
-# We will display at the end of this Makefile.config, using $(call feature_display_entries)
-# As we may retry some feature detection here, see the disassembler-four-args case, for instance
+# We will display at the end of this Makefile.config, using $(call feature_display_entries),
+# as we may retry some feature detection here.
   FEATURE_DISPLAY_DEFERRED := 1
 include $(srctree)/tools/build/Makefile.feature
 else
@@ -927,8 +927,6 @@ ifdef BUILD_NONDISTRO
 
   ifeq ($(feature-libbfd), 1)
     EXTLIBS += -lbfd -lopcodes
-    FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl
-    FEATURE_CHECK_LDFLAGS-disassembler-init-styled = -lbfd -lopcodes -ldl
   else
     # we are on a system that requires -liberty and (maybe) -lz
     # to link against -lbfd; test each case individually here
@@ -940,13 +938,9 @@ ifdef BUILD_NONDISTRO
 
     ifeq ($(feature-libbfd-liberty), 1)
       EXTLIBS += -lbfd -lopcodes -liberty
-      FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl
-      FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl
     else
       ifeq ($(feature-libbfd-liberty-z), 1)
         EXTLIBS += -lbfd -lopcodes -liberty -lz
-        FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl
-        FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -lz -ldl
       endif
     endif
     $(call feature_check,disassembler-four-args)
@@ -1324,6 +1318,6 @@ endif
 
 # re-generate FEATURE-DUMP as we may have called feature_check, found out
 # extra libraries to add to LDFLAGS of some other test and then redo those
-# tests, see the block about libbfd, disassembler-four-args, for instance.
+# tests.
 $(shell rm -f $(FEATURE_DUMP_FILENAME))
 $(foreach feat,$(FEATURE_TESTS),$(shell echo "$(call feature_assign,$(feat))" >> $(FEATURE_DUMP_FILENAME)))

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/5] perf build: nondistro build tidyups
  2025-12-23 17:00 [PATCH 0/5] perf build: nondistro build tidyups James Clark
  2025-12-23 17:00 ` [PATCH 1/5] perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting James Clark
@ 2026-01-06 22:18 ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-01-06 22:18 UTC (permalink / raw)
  To: James Clark
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Leo Yan,
	Justin Stitt, linux-perf-users, linux-kernel, Roberto Sassu,
	Alexei Starovoitov, Andres Freund, Andrii Nakryiko,
	Daniel Borkmann, John Fastabend, KP Singh, Martin KaFai Lau,
	Nick Terrell, Song Liu, bpf, llvm, Arnaldo Carvalho de Melo,
	Quentin Monnet, Stanislav Fomichev

On Tue, Dec 23, 2025 at 05:00:23PM +0000, James Clark wrote:
> nondistro builds now require a specific version of libbfd, so this adds
> an error when doing an explicit BUILD_NONDISTRO build and some other
> related tidyups.
> 
> I'm not sure if the intention is to skip build-tests if something is
> missing, but I see it was done for libbpf versions, so I added the same
> for libbfd. This is the main thing that I hit, that build-test all of a
> sudden stopped working for me.
> 
> The first commit is also a cherry pick of an old commit that seemed to
> have been accidentally reverted in the unrelated change linked in the
> trailers.

Thanks, applied to perf-tools-next,

- Arnaldo
 
> ---
> James Clark (4):
>       perf build: Do all non-distro feature checks in one go
>       perf build: Remove unused libbfd-buildid feature test
>       perf build: Feature test for libbfd thread safety API
>       perf build: Skip nondistro build test if libbfd is old
> 
> Roberto Sassu (1):
>       perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting
> 
>  tools/build/Makefile.feature                 |  2 +-
>  tools/build/feature/Makefile                 |  4 +--
>  tools/build/feature/test-libbfd-buildid.c    |  8 -----
>  tools/build/feature/test-libbfd-threadsafe.c | 18 ++++++++++
>  tools/perf/Makefile.config                   | 54 ++++++++++------------------
>  tools/perf/tests/make                        |  5 +++
>  6 files changed, 45 insertions(+), 46 deletions(-)
> ---
> base-commit: cbd41c6d4c26c161a2b0e70ad411d3885ff13507
> change-id: 20251223-james-libbfd-feat-check-e0cd09d2c1e1
> 
> Best regards,
> -- 
> James Clark <james.clark@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-06 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23 17:00 [PATCH 0/5] perf build: nondistro build tidyups James Clark
2025-12-23 17:00 ` [PATCH 1/5] perf build: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting James Clark
2026-01-06 22:18 ` [PATCH 0/5] perf build: nondistro build tidyups Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox