diff mbox series

[8/8] libtracefs: Add -rpath to libtracefs.so

Message ID 20201216201135.380840809@goodmis.org (mailing list archive)
State Accepted
Commit acea1910939f3ae63e0b298cad87b62bac42c4f7
Headers show
Series libtracefs: More Makefile updates to make packaging the library easier | expand

Commit Message

Steven Rostedt Dec. 16, 2020, 8:11 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

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

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 mbox series

Patch

diff --git a/scripts/utils.mk b/scripts/utils.mk
index 0d3c3194f6c5..7742e1981cef 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -56,7 +56,7 @@  do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ -Wl,-soname,$(@F) -o $@ $(LIBS))
+	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\