[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251223-james-libbfd-feat-check-v1-2-0e901ba32ed9@linaro.org>
Date: Tue, 23 Dec 2025 17:00:25 +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 2/5] perf build: Do all non-distro feature checks in one go
None of the if statements or variable assignments in the non-distro
block actually affect the feature checks. Just do them all in one place
so the flow isn't obscured.
Signed-off-by: James Clark <james.clark@...aro.org>
---
tools/perf/Makefile.config | 32 ++++++++++++--------------------
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index ea6636a09a95..594fe3ecfee0 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -923,36 +923,28 @@ ifneq ($(NO_JEVENTS),1)
endif
ifdef BUILD_NONDISTRO
+ # call all detections now so we get correct status in VF output
$(call feature_check,libbfd)
+ $(call feature_check,disassembler-four-args)
+ $(call feature_check,disassembler-init-styled)
+ $(call feature_check,libbfd-buildid)
+ $(call feature_check,libbfd-liberty)
+ $(call feature_check,libbfd-liberty-z)
+ # 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)
EXTLIBS += -lbfd -lopcodes
- else
- # we are on a system that requires -liberty and (maybe) -lz
- # to link against -lbfd; test each case individually here
-
- # call all detections now so we get correct
- # status in VF output
- $(call feature_check,libbfd-liberty)
- $(call feature_check,libbfd-liberty-z)
-
- ifeq ($(feature-libbfd-liberty), 1)
- EXTLIBS += -lbfd -lopcodes -liberty
- else
- ifeq ($(feature-libbfd-liberty-z), 1)
- EXTLIBS += -lbfd -lopcodes -liberty -lz
- endif
- endif
- $(call feature_check,disassembler-four-args)
- $(call feature_check,disassembler-init-styled)
+ 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
CXXFLAGS += -DHAVE_LIBBFD_SUPPORT
$(call detected,CONFIG_LIBBFD)
- $(call feature_check,libbfd-buildid)
-
ifeq ($(feature-libbfd-buildid), 1)
CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
else
--
2.34.1
Powered by blists - more mailing lists