[PATCH] tools lib traceevent: Add dependency to libdl

From: Namhyung Kim
Date: Mon Aug 01 2016 - 23:03:00 EST


The libtraceevent has dependency to libdl due to plugins. So if
external program wants to link libtraceevent it also needs to add -ldl
to the compiler command line. Make it explicit so that external
programs doesn't care about the internel dependency of libtraceevent
anymore.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/lib/traceevent/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index c76012ebdb9c..bae0c090c638 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -173,7 +173,7 @@ $(TE_IN): force
$(Q)$(MAKE) $(build)=libtraceevent

$(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
- $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+ $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ -ldl
@ln -sf $(@F) $(OUTPUT)libtraceevent.so
@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)

--
2.9.2