From 4374b541aa4937dee4d57f8fad5a4a8f84c56593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= Date: Wed, 9 Jul 2025 17:04:15 +0200 Subject: [PATCH] packages/linux-tools: perf: enforce PKG_CONFIG_LIBDIR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For kernel patched with 440cf77625e3 ("perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation"), if neither PKG_CONFIG_LIBDIR, PKG_CONFIG_PATH nor PKG_CONFIG_SYSROOT_DIR are provided, the perf Makefile while try to set some default value for PKG_CONFIG_LIBDIR, which will not point correctly to buildroot staging directory. This issue will lead for example to a failure to find libtraceevent even if it is correctly enabled and installed in the staging dir, and so it will make perf fail to build. Make sure to call the perf make command with PKG_CONFIG_LIBDIR variable set and pointing to buildroot staging area to make sure to properly detect perf dependencies. Signed-off-by: Alexis Lothoré Reviewed-by: Luca Ceresoli Tested-by: Luca Ceresoli Signed-off-by: Julien Olivain (cherry picked from commit f784c823ef8357aa36828342f83d5fd59995937e) Signed-off-by: Thomas Perale --- package/linux-tools/linux-tool-perf.mk.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in index 1e19ee7f1c..3238948d76 100644 --- a/package/linux-tools/linux-tool-perf.mk.in +++ b/package/linux-tools/linux-tool-perf.mk.in @@ -23,6 +23,7 @@ PERF_MAKE_FLAGS = \ JOBS=$(PARALLEL_JOBS) \ ARCH=$(PERF_ARCH) \ DESTDIR=$(TARGET_DIR) \ + PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ prefix=/usr \ NO_GTK2=1 \ NO_LIBPERL=1 \