Skip to contentSkip to conversation

libtracefs: Do not show the full version in the library SONAME

PATCH New Steven Rostedt 1 participant 1 message Dec 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtracefs: Do not show the full version in the library SONAME

From: "Steven Rostedt (VMware)" <[email protected]>

The SONAME of the library should point to the same object as the libtracefs.so does. Since the soft link libtracefs.so points to libtracefs.so.1, then so should the SONAME of the executable.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210875

---
 scripts/utils.mk | 2 +-
 src/Makefile     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/utils.mk +1 -1
index 7742e19..32a9b3c 100644
@@ -56,7 +56,7 @@ do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
+	$(CC) --shared $^ '-Wl,-soname,$(1),-rpath=$$ORIGIN' -o $@ $(LIBS))
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\
src/Makefile +1 -1
index 52f17af..3f64905 100644
@@ -17,7 +17,7 @@ $(LIBTRACEFS_STATIC): $(OBJS)
 	$(Q)$(call do_build_static_lib)
 
 $(LIBTRACEFS_SHARED): $(OBJS)
-	$(Q)$(call do_compile_shared_library)
+	$(Q)$(call do_compile_shared_library,$(notdir $(LIBTRACEFS_SHARED_VERSION)))
 
 $(LIBTRACEFS_SHARED_VERSION): $(LIBTRACEFS_SHARED)
 	@ln -sf $(<F) $@
Signature · 1 line
2.25.4