[PATCH 1/2] libtracecmd: Add -rpath to libtracecmd.so

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

 



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

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@xxxxxxxxxx>
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
 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





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

  Powered by Linux