[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241211093114.263742-3-leo.yan@arm.com>
Date: Wed, 11 Dec 2024 09:31:13 +0000
From: Leo Yan <leo.yan@....com>
To: Quentin Monnet <qmo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
Nick Terrell <terrelln@...com>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
James Clark <james.clark@...aro.org>,
Guilherme Amadio <amadio@...too.org>,
linux-kernel@...r.kernel.org,
bpf@...r.kernel.org,
linux-perf-users@...r.kernel.org
Cc: Leo Yan <leo.yan@....com>
Subject: [PATCH v2 2/3] perf: build: Minor improvement for linking libzstd
The zstd library will be automatically linked automatically by detecting
the feature-libzstd. It is no need to explicitly link it for static
builds, so remove the redundant linkage.
It is contradictory to detect the feature-libelf-zstd while the build
configuration NO_LIBZSTD is set. Report an error for reminding users
not to set NO_LIBZSTD.
Signed-off-by: Leo Yan <leo.yan@....com>
---
tools/perf/Makefile.config | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 0e4f6a860ae2..155cb9d20011 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -171,7 +171,7 @@ ifdef LIBDW_DIR
endif
DWARFLIBS := -ldw
ifeq ($(findstring -static,${LDFLAGS}),-static)
- DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd
+ DWARFLIBS += -lelf -lz -llzma -lbz2
LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0
LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))
@@ -566,6 +566,12 @@ ifndef NO_LIBELF
CFLAGS += -DHAVE_ELF_GETSHDRSTRNDX_SUPPORT
endif
+ ifeq ($(feature-libelf-zstd), 1)
+ ifdef NO_LIBZSTD
+ $(error Error: libzstd is required by libelf, please do not set NO_LIBZSTD)
+ endif
+ endif
+
ifndef NO_LIBDEBUGINFOD
$(call feature_check,libdebuginfod)
ifeq ($(feature-libdebuginfod), 1)
--
2.34.1
Powered by blists - more mailing lists