diff mbox series

[2/2] libtracecmd: use major version as SONAME

Message ID 164267846050.9929.8644383666340215448.stgit@work (mailing list archive)
State Accepted
Headers show
Series (Trivial) README fix and libtracecmd SONAME | expand

Commit Message

Dario Faggioli Jan. 20, 2022, 11:34 a.m. UTC
Currently, the SONAME of libtracecmd is libtracecmd.so.0.0.1, which
is legit and overall fine, but slightly inconvenient for packaging.

For other libreries, like libtraceevent and libtracefs, it is set to
libtraceevent.so.1 and libtracefs.so.1. Do the same here

Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 lib/trace-cmd/Makefile |    2 +-
 scripts/utils.mk       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index 1760031..c9d36d1 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -55,7 +55,7 @@  $(LIBTRACECMD_SHARED_SO): $(LIBTRACECMD_SHARED_VERSION)
 libtracecmd.so: force $(LIBTRACECMD_SHARED_SO)
 
 $(LIBTRACECMD_SHARED): $(OBJS)
-	$(Q)$(call do_compile_shared_library)
+	$(Q)$(call do_compile_shared_library,$(notdir $(LIBTRACECMD_SHARED_VERSION)))
 
 $(bdir)/%.o: %.c
 	$(Q)$(call do_fpic_compile)
diff --git a/scripts/utils.mk b/scripts/utils.mk
index 53b2b07..3fc2d74 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -72,7 +72,7 @@  do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
+	$(CC) --shared $^ '-Wl,-soname,$(1),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\