summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorGuilherme Amadio <amadio@gentoo.org>2024-07-17 19:47:36 +0200
committerNamhyung Kim <namhyung@kernel.org>2024-07-17 13:14:35 -0700
commit8f61e98ad51f167de148488b1881de72fec0d563 (patch)
tree4056607e4dd79f33cda90e25926a98c70324328a /tools/perf
parent37ac347f87b616525e0fd397cfc9a163328173aa (diff)
downloadlwn-8f61e98ad51f167de148488b1881de72fec0d563.tar.gz
lwn-8f61e98ad51f167de148488b1881de72fec0d563.zip
tools: Make pkg-config dependency checks usable by other tools
Other tools, in tools/verification and tools/tracing, make use of libtraceevent and libtracefs as dependencies. This allows setting up the feature check flags for them as well. Signed-off-by: Guilherme Amadio <amadio@gentoo.org> Tested-by: Thorsten Leemhuis <linux@leemhuis.info> Tested-by: Leo Yan <leo.yan@arm.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20240717174739.186988-3-amadio@gentoo.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Makefile.config11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 44f010b9f562..c896babf7a74 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -182,20 +182,15 @@ endif
FEATURE_CHECK_CFLAGS-libzstd := $(LIBZSTD_CFLAGS)
FEATURE_CHECK_LDFLAGS-libzstd := $(LIBZSTD_LDFLAGS)
+# for linking with debug library, run like:
+# make DEBUG=1 PKG_CONFIG_PATH=/opt/libtraceevent/(lib|lib64)/pkgconfig
+
ifneq ($(NO_LIBTRACEEVENT),1)
ifeq ($(call get-executable,$(PKG_CONFIG)),)
$(error Error: $(PKG_CONFIG) needed by libtraceevent is missing on this system, please install it)
endif
endif
-# for linking with debug library, run like:
-# make DEBUG=1 PKG_CONFIG_PATH=/opt/libtraceevent/(lib|lib64)/pkgconfig
-FEATURE_CHECK_CFLAGS-libtraceevent := $(shell $(PKG_CONFIG) --cflags libtraceevent 2>/dev/null)
-FEATURE_CHECK_LDFLAGS-libtraceevent := $(shell $(PKG_CONFIG) --libs libtraceevent 2>/dev/null)
-
-FEATURE_CHECK_CFLAGS-libtracefs := $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null)
-FEATURE_CHECK_LDFLAGS-libtracefs := $(shell $(PKG_CONFIG) --libs libtracefs 2>/dev/null)
-
FEATURE_CHECK_CFLAGS-bpf = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi -I$(srctree)/tools/include/uapi
# include ARCH specific config
-include $(src-perf)/arch/$(SRCARCH)/Makefile