From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - makefiles: add check for versioned symbols
Date: Tue, 6 Apr 2021 20:07:19 +0000 (GMT) [thread overview]
Message-ID: <20210406200719.6101D3846079@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c23f4c8075655aeaef96b3e19ad44c0be78020c9
Commit: c23f4c8075655aeaef96b3e19ad44c0be78020c9
Parent: 40b277ae1799fc7a2e3f38b0abebd81a8e3d1995
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Tue Apr 6 14:39:44 2021 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Tue Apr 6 21:26:57 2021 +0200
makefiles: add check for versioned symbols
Simple check produced library has the latest symbol as well as its versioned
older version with check for dm_stats_create_region().
---
libdm/Makefile.in | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/libdm/Makefile.in b/libdm/Makefile.in
index 12fec06b4..a78d2b517 100644
--- a/libdm/Makefile.in
+++ b/libdm/Makefile.in
@@ -47,7 +47,7 @@ endif
LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
LIB_VERSION = $(LIB_VERSION_DM)
-TARGETS = libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION)
+TARGETS = libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) .symver_check
CFLOW_LIST = $(SOURCES)
CFLOW_LIST_TARGET = libdevmapper.cflow
@@ -69,6 +69,16 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION): $(LIB_SHAR
@echo " [LN] $<"
$(Q) $(LN_S) -f $< $@
+# Check versioned build when default versioned symbol is present @@
+# also the older symbol is built-in
+.symver_check: $(LIB_SHARED)
+ @echo " [CHECK] $<"
+ $(Q) if readelf -Ws $< | grep -q dm_stats_create_region@@; then \
+ SYM=$$(readelf -Ws $< | grep dm_stats_create_region@DM_1_02_106); \
+ if test -n "$$SYM"; then touch $@; \
+ else echo >&2 "Missing versioned symbols in $<"; false; fi; \
+ else touch $@; fi
+
.PHONY: install_dynamic install_static install_include \
install_ioctl install_ioctl_static \
install_pkgconfig
reply other threads:[~2021-04-06 20:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210406200719.6101D3846079@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.