[PATCH v2 4/5] trace-cmd: Have libtracecmd.so include libtraceevent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

Was getting errors with loading libtracecmd.so with undefined symbols
from libtraceevent. Add it to the build process to include what it uses
as well.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
 Makefile               | 2 +-
 lib/trace-cmd/Makefile | 2 ++
 scripts/utils.mk       | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c22aa7847b51..9c74268eddd5 100644
--- a/Makefile
+++ b/Makefile
@@ -301,7 +301,7 @@ $(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
 $(LIBTRACECMD_STATIC): force
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
 
-$(LIBTRACECMD_SHARED): force
+$(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED)
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
 
 libtraceevent.so: $(LIBTRACEEVENT_SHARED)
diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index 6f3e6b1bf935..29c36ca195d0 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -35,6 +35,8 @@ $(DEPS): | $(bdir)
 $(bdir)/libtracecmd.a: $(OBJS)
 	$(Q)$(call do_build_static_lib)
 
+LIBS = -L$(obj)/lib/traceevent -ltraceevent
+
 $(bdir)/libtracecmd.so: $(OBJS)
 	$(Q)$(call do_compile_shared_library)
 
diff --git a/scripts/utils.mk b/scripts/utils.mk
index 8434aea7c24f..ccd4840f9364 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -61,7 +61,7 @@ do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ -Wl,-soname,$(@F) -o $@)
+	$(CC) --shared $^ $(LIBS) -Wl,-soname,$(@F) -o $@)
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\
-- 
2.24.1





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux