[PATCH 2/2] libtracefs: Support EXTRA_LIBS for utest

Benjamin Drung <[email protected]> Fri, 05 Jun 2026 14:53:35 +0000
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
Allow building the utest against the system installed libtracefs library
by tweaking the make variables:

```
make LIBTRACEFS_STATIC= EXTRA_LIBS=-ltracefs test
```

Note: This still requires making `tfs_find_debug_tracing_dir` available.
---
 utest/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utest/Makefile b/utest/Makefile
index 9bd3dea..bcb87b6 100644
--- a/utest/Makefile
+++ b/utest/Makefile
@@ -14,7 +14,8 @@ LIBTRACEFS_STATIC ?= $(obj)/lib/libtracefs.a
 
 LIBS += -lcunit				\
 	-ldl				\
-	$(LIBTRACEFS_STATIC)
+	$(LIBTRACEFS_STATIC)		\
+	$(EXTRA_LIBS)
 
 OBJS := $(OBJS:%.o=$(bdir)/%.o)
 
-- 
2.53.0