linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] trace-cmd: Add -rpath to trace-cmd and libtracecmd.so
@ 2020-12-16 20:19 Steven Rostedt
  2020-12-16 20:19 ` [PATCH 1/2] libtracecmd: Add -rpath to libtracecmd.so Steven Rostedt
  2020-12-16 20:19 ` [PATCH 2/2] trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2020-12-16 20:19 UTC (permalink / raw)
  To: linux-trace-devel


Steven Rostedt (VMware) (2):
      libtracecmd: Add -rpath to libtracecmd.so
      trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so

----
 scripts/utils.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] libtracecmd: Add -rpath to libtracecmd.so
  2020-12-16 20:19 [PATCH 0/2] trace-cmd: Add -rpath to trace-cmd and libtracecmd.so Steven Rostedt
@ 2020-12-16 20:19 ` Steven Rostedt
  2020-12-16 20:19 ` [PATCH 2/2] trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2020-12-16 20:19 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Yordan Karadzhov

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Pass in "-rpath=$ORIGIN" to the linker when building libtracecmd.so, such
that the path for libtraceevent.so and libtracefs.so might be found if it is
installed in the same location as libtracecmd.

Suggested-by: Yordan Karadzhov <ykaradzhov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 scripts/utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/utils.mk b/scripts/utils.mk
index c06888795ddf..8ac38cc983b1 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -64,7 +64,7 @@ do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ $(LIBS) -Wl,-soname,$(@F) -o $@)
+	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so
  2020-12-16 20:19 [PATCH 0/2] trace-cmd: Add -rpath to trace-cmd and libtracecmd.so Steven Rostedt
  2020-12-16 20:19 ` [PATCH 1/2] libtracecmd: Add -rpath to libtracecmd.so Steven Rostedt
@ 2020-12-16 20:19 ` Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2020-12-16 20:19 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Yordan Karadzhov

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Add a search path into the trace-cmd executable to find where libtracecmd.so
exists, when it is executed.

Suggested-by: Yordan Karadzhov <ykaradzhov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 scripts/utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/utils.mk b/scripts/utils.mk
index 8ac38cc983b1..03389126a11c 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -56,7 +56,7 @@ do_compile =							\
 
 do_app_build =						\
 	($(print_app_build)				\
-	$(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
+	$(CC) $^ -rdynamic -Wl,-rpath=$(libdir) -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
 
 do_build_static_lib =				\
 	($(print_static_lib_build)		\
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-16 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 20:19 [PATCH 0/2] trace-cmd: Add -rpath to trace-cmd and libtracecmd.so Steven Rostedt
2020-12-16 20:19 ` [PATCH 1/2] libtracecmd: Add -rpath to libtracecmd.so Steven Rostedt
2020-12-16 20:19 ` [PATCH 2/2] trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).