trace-cmd: Add -rpath to trace-cmd and libtracecmd.so
cover trace-cmd: Add -rpath to trace-cmd and libtracecmd.so
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(-)
PATCH 1/2 libtracecmd: Add -rpath to libtracecmd.so
From: "Steven Rostedt (VMware)" <[email protected]>
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 <[email protected]>
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- scripts/utils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/utils.mk +1 -1
@@ -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) \
Signature · 1 line
2.29.2
PATCH 2/2 trace-cmd: Add -rpath=$(libdir) for trace-cmd to find libtracecmd.so
In reply to Steven RostedtFrom: "Steven Rostedt (VMware)" <[email protected]>
Add a search path into the trace-cmd executable to find where libtracecmd.so exists, when it is executed.
Suggested-by Yordan Karadzhov <[email protected]>
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- scripts/utils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/utils.mk +1 -1
@@ -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) \
Signature · 1 line
2.29.2