From 0f0e1f44569061e3dc590cd0b8cb74d8fd53706b Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Thu, 6 Jun 2024 17:33:01 +0200 Subject: perf build: Use pkg-config for feature check for libtrace{event,fs} Needed to add required include directories for the feature detection to succeed. The header tracefs.h is installed either into the include directory /usr/include/tracefs/tracefs.h when using the Makefile, or into /usr/include/libtracefs/tracefs.h when using meson to build libtracefs. The header tracefs.h uses #include from libtraceevent, so pkg-config needs to pick the correct include directory for libtracefs and add the one for libtraceevent to succeed. Note that in baa2ca59ec1e31ccbe3f24ff0368152b36f68720 the variable LIBTRACEEVENT_DIR was introduced, and now the method to compile against non-standard locations requires PKG_CONFIG_PATH to be set instead, which works for both libtraceevent and libtracefs. Signed-off-by: Guilherme Amadio Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240606153625.2255470-2-amadio@gentoo.org --- tools/build/feature/test-libtracefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/build') diff --git a/tools/build/feature/test-libtracefs.c b/tools/build/feature/test-libtracefs.c index 8eff16c0c10b..29a757a7d848 100644 --- a/tools/build/feature/test-libtracefs.c +++ b/tools/build/feature/test-libtracefs.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 -#include +#include int main(void) { -- cgit v1.2.3-70-g09d2