linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: Yordan Karadzhov <ykaradzhov@vmware.com>
Subject: [PATCH 1/2] libtracecmd: Add -rpath to libtracecmd.so
Date: Wed, 16 Dec 2020 15:19:39 -0500	[thread overview]
Message-ID: <20201216202002.933559836@goodmis.org> (raw)
In-Reply-To: 20201216201938.008772358@goodmis.org

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



  reply	other threads:[~2020-12-16 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-12-16 20:19 ` [PATCH 2/2] trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201216202002.933559836@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=ykaradzhov@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).