[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251223-james-libbfd-feat-check-v1-5-0e901ba32ed9@linaro.org>
Date: Tue, 23 Dec 2025 17:00:28 +0000
From: James Clark <james.clark@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>, Leo Yan <leo.yan@....com>,
Justin Stitt <justinstitt@...gle.com>
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
James Clark <james.clark@...aro.org>
Subject: [PATCH 5/5] perf build: Skip nondistro build test if libbfd is old
Non distro builds now require a new version of libbfd, so skip the test
if the library is too old.
The grep test isn't a strong as the feature test in
test-libbfd-threadsafe.c, but there seems to be precedent for feature
testing this way here and it's good enough for the build-test rule. If
the function exists but returns an error it will be picked up by the
feature test when attempting the build.
Signed-off-by: James Clark <james.clark@...aro.org>
---
tools/perf/tests/make | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 6641701e4828..36411b4b6d2b 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -124,6 +124,9 @@ make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_LIBBPF=1
make_minimal += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
make_minimal += NO_LIBCAP=1 NO_CAPSTONE=1
+# binutils 2_42 and newer have bfd_thread_init()
+new_libbfd := $(shell echo '#include <bfd.h>' | $(CC) -E -x c - | grep bfd_thread_init)
+
# $(run) contains all available tests
run := make_pure
# Targets 'clean all' can be run together only through top level
@@ -137,7 +140,9 @@ MAKE_F := $(MAKE) -f $(MK)
endif
run += make_python_perf_so
run += make_debug
+ifneq ($(new_libbfd),)
run += make_nondistro
+endif
run += make_extra_tests
run += make_jevents_all
run += make_no_bpf_skel
--
2.34.1
Powered by blists - more mailing lists