diff mbox series

[4/4] trace-cmd: Set SONAME on shared libraries

Message ID 20190720030344.1991393-5-chutzpah@gentoo.org (mailing list archive)
State Accepted
Headers show
Series trace-cmd: Fixes for packaging | expand

Commit Message

Patrick McLean July 20, 2019, 3:03 a.m. UTC
From: Patrick McLean <patrick.mclean@sony.com>

Currently trace-cmd installs some shared libraries, but does not set a
SONAME on these. This often violates distro policies, so it should at
least set something.

This patch sets it to the name of the file, which is somewhat naieve,
but works for many libraries. Generally it should be set to have an ABI
version as the extension, so when the developer breaks ABI, they can
change the soname.

Signed-off-by: Patrick McLean <patrick.mclean@sony.com>
---
 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 260023a..9eb127d 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -54,7 +54,7 @@  do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ -o $@)
+	$(CC) --shared $^ -Wl,-soname,$@ -o $@)
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\