Thread (3 messages) flat view 3 messages, 2 authors, 2024-06-21
STALE820d

[PATCH] tools: build: use correct lib name for libtracefs feature detection

From: Daniel Wagner <hidden>
Date: 2024-06-17 18:38:23
Also in: lkml
Subsystem: the rest · Maintainer: Linus Torvalds

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.

Signed-off-by: Daniel Wagner <redacted>
---
Our downstream packaging stop working. After a bit of didding I found out that
the libtracefs feature detection is not completely right.

https://build.opensuse.org/build/benchmark/SLE_15_SP5/x86_64/rtla/_log
---
 tools/build/feature/Makefile          | 2 +-
 tools/build/feature/test-libtracefs.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index ed54cef450f5..489cbed7e82a 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -213,7 +213,7 @@ endif
 	$(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
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 <tracefs/tracefs.h>
+#include <tracefs.h>
 
 int main(void)
 {
---
base-commit: 0bbac3facb5d6cc0171c45c9873a2dc96bea9680
change-id: 20240617-rtla-build-83020baf9277

Best regards,
-- 
Daniel Wagner [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help