From: Guilherme Amadio Date: Wed, 17 Jul 2024 17:47:39 +0000 (+0200) Subject: tools/latency: Use pkg-config in lib_setup of Makefile.config X-Git-Tag: v6.11-rc1~58^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2085948e5f8b31c1ec1bc92413794d11ff749bb2;p=thirdparty%2Fkernel%2Flinux.git tools/latency: Use pkg-config in lib_setup of Makefile.config This allows to build against libtraceevent and libtracefs installed in non-standard locations. Signed-off-by: Guilherme Amadio Tested-by: Thorsten Leemhuis Tested-by: Leo Yan Acked-by: Steven Rostedt (Google) Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20240717174739.186988-6-amadio@gentoo.org Signed-off-by: Namhyung Kim --- diff --git a/tools/tracing/latency/Makefile.config b/tools/tracing/latency/Makefile.config index b25e531a1f957..0fe6b50f029bf 100644 --- a/tools/tracing/latency/Makefile.config +++ b/tools/tracing/latency/Makefile.config @@ -3,8 +3,9 @@ STOP_ERROR := define lib_setup - $(eval EXTLIBS += -l$(1)) $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)")) + $(eval LDFLAGS += $(shell sh -c "$(PKG_CONFIG) --libs-only-L lib$(1)")) + $(eval EXTLIBS += $(shell sh -c "$(PKG_CONFIG) --libs-only-l lib$(1)")) endef $(call feature_check,libtraceevent)