summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorJames Clark <james.clark@linaro.org>2025-12-23 20:00:27 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-01-07 01:14:46 +0300
commitcff602f65988da48cc1b84f6c3588a25a320fa81 (patch)
tree04469bfba77efea09b66f7383898ab56ff8392a3 /tools/perf
parentc0cb97a275ffa00d91a0715dce8105ae3f627727 (diff)
downloadlinux-cff602f65988da48cc1b84f6c3588a25a320fa81.tar.xz
perf build: Feature test for libbfd thread safety API
The non-distro build requires libbfd 2.42 since commit b72b8132d8fd ("perf libbfd: Ensure libbfd is initialized prior to use"). Add a feature test so that it's obvious why the build fails if this criteria isn't met. Signed-off-by: James Clark <james.clark@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Bill Wendling <morbo@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Justin Stitt <justinstitt@google.com> Cc: Leo Yan <leo.yan@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Makefile.config5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index fb1cf2bf5d83..6f2c7bd36e74 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -935,9 +935,14 @@ ifdef BUILD_NONDISTRO
$(call feature_check,libbfd)
$(call feature_check,disassembler-four-args)
$(call feature_check,disassembler-init-styled)
+ $(call feature_check,libbfd-threadsafe)
$(call feature_check,libbfd-liberty)
$(call feature_check,libbfd-liberty-z)
+ ifneq ($(feature-libbfd-threadsafe), 1)
+ $(error binutils 2.42 or later is required for non-distro builds)
+ endif
+
# we may be on a system that requires -liberty and (maybe) -lz
# to link against -lbfd; test each case individually here
ifeq ($(feature-libbfd), 1)