Forwarded: https://lore.kernel.org/lkml/
20191226224931.3458-1-sudipm.mukherjee@gmail.com/
event-plugin.c is calling dl_*() functions but it is not linked with
libdl. As a result when we use ldd on the generated libtraceevent.so
file, it does not list libdl as one of its dependencies.
Add -ldl explicitly as done in tools/lib/lockdep.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name 0005-libtraceevent-Add-dependency-on-libdl.patch
$(Q)$(MAKE) $(build)=libtraceevent
$(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
- $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+ $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -ldl -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
@ln -sf $(@F) $(OUTPUT)libtraceevent.so
@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)