tools: build: use correct lib name for libtracefs feature detection
authorDaniel Wagner <dwagner@suse.de>
Mon, 17 Jun 2024 18:38:04 +0000 (20:38 +0200)
committerDaniel Bristot de Oliveira <bristot@kernel.org>
Fri, 21 Jun 2024 08:28:06 +0000 (10:28 +0200)
Use libtracefs as package name to lookup the CFLAGS for libtracefs. This
makes it possible to use the distro specific path as include path for
the header file.

Link: https://lkml.kernel.org/r/20240617-rtla-build-v1-1-6882c34678e8@suse.de
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
tools/build/feature/Makefile
tools/build/feature/test-libtracefs.c

index ed54cef450f58b162eb10e6daaea6f0e4718faaf..489cbed7e82a7d59aacc5923d9c769a400788ab2 100644 (file)
@@ -213,7 +213,7 @@ $(OUTPUT)test-libtraceevent.bin:
        $(BUILD) -ltraceevent
 
 $(OUTPUT)test-libtracefs.bin:
-        $(BUILD) $(shell $(PKG_CONFIG) --cflags libtraceevent 2>/dev/null) -ltracefs
+        $(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs
 
 $(OUTPUT)test-libcrypto.bin:
        $(BUILD) -lcrypto
index 8eff16c0c10b628e44db6d1d3bf79ebc35d5f2c3..29a757a7d8482f9ab43e290b9166bb8ae733d674 100644 (file)
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-#include <tracefs/tracefs.h>
+#include <tracefs.h>
 
 int main(void)
 {