]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/rtla: Use pkg-config in lib_setup of Makefile.config
authorGuilherme Amadio <amadio@gentoo.org>
Fri, 12 Jul 2024 19:40:49 +0000 (21:40 +0200)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 17 Jul 2024 20:15:08 +0000 (13:15 -0700)
This allows to build against libtraceevent and libtracefs installed
in non-standard locations.

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>
Link: https://lore.kernel.org/r/20240712194511.3973899-5-amadio@gentoo.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/tracing/rtla/Makefile.config

index 0b7ecfb30d19784009ecec0d83ca088f31811116..5f8c286712d4c11c01500a71f44f5b3a4dc6a458 100644 (file)
@@ -7,7 +7,8 @@ LIBTRACEFS_MIN_VERSION = 1.6
 
 define lib_setup
   $(eval LIB_INCLUDES += $(shell sh -c "$(PKG_CONFIG) --cflags lib$(1)"))
-  $(eval EXTLIBS += -l$(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)