All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <iwj@xenproject.org>, Wei Liu <wl@xen.org>,
	Juergen Gross <jgross@suse.com>
Subject: [PATCH 3/3] tools/libs: Check ABI # DO NOT APPLY YET
Date: Mon, 1 Mar 2021 17:00:44 +0000	[thread overview]
Message-ID: <20210301170044.23295-4-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <20210301170044.23295-1-andrew.cooper3@citrix.com>

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <iwj@xenproject.org>
CC: Wei Liu <wl@xen.org>
CC: Juergen Gross <jgross@suse.com>
---
 tools/libs/.gitignore |  2 ++
 tools/libs/libs.mk    | 15 +++++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/tools/libs/.gitignore b/tools/libs/.gitignore
index 4a13126144..655f46a6e8 100644
--- a/tools/libs/.gitignore
+++ b/tools/libs/.gitignore
@@ -1 +1,3 @@
+*/abi.chk
+*/compat_reports/
 */headers.lst
diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk
index a68cec244c..c12e779e63 100644
--- a/tools/libs/libs.mk
+++ b/tools/libs/libs.mk
@@ -96,12 +96,19 @@ lib$(LIB_FILE_NAME).so.$(MAJOR): lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR)
 lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxen$(LIBNAME).map
 	$(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDUSELIBS) $(APPEND_LDFLAGS)
 
-# If abi-dumper is available, write out the ABI analysis
-ifneq ($(ABI_DUMPER),)
-libs: $(PKG_ABI)
 $(PKG_ABI): lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) headers.lst
 	$(ABI_DUMPER) $< -o $@ -public-headers headers.lst -lver $(MAJOR).$(MINOR)
+
+abi.chk: $(PKG_OLD_ABI) $(PKG_ABI)
+	$(ABI_COMPLIANCE_CHECKER) -l lib$(LIB_FILE_NAME) -old $(PKG_OLD_ABI) -new $(PKG_ABI)
+	touch $@
+
+ifneq ($(ABI_COMPLIANCE_CHECKER),)
+ifeq ($(debug_symbols),y)
+libs: abi.chk
 endif
+endif
+
 
 .PHONY: install
 install: build
@@ -131,7 +138,7 @@ TAGS:
 clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) lib$(LIB_FILE_NAME).so.$(MAJOR)
-	rm -f headers.chk headers.lst
+	rm -f headers.chk headers.lst abi.chk
 	rm -f $(PKG_CONFIG)
 	rm -f _paths.h
 
-- 
2.11.0



  parent reply	other threads:[~2021-03-01 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 17:00 [PATCH for-4.15 0/3] tools: ABI checking Andrew Cooper
2021-03-01 17:00 ` [PATCH 1/3] tools: Check for abi-compliance-checker in ./configure Andrew Cooper
2021-03-01 17:17   ` Ian Jackson
2021-03-01 17:00 ` [PATCH 2/3] tools/libs: Stash the 4.14 API/ABIs for the stable libraries Andrew Cooper
2021-03-01 17:18   ` Ian Jackson
2021-03-02 10:45   ` Jürgen Groß
2021-03-02 11:17     ` Andrew Cooper
2021-03-02 11:21       ` Jan Beulich
2021-03-02 11:26         ` Andrew Cooper
2021-03-02 11:38           ` Jan Beulich
2021-03-01 17:00 ` Andrew Cooper [this message]
2021-03-01 17:30 ` [PATCH for-4.15 0/3] tools: ABI checking Andrew Cooper

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=20210301170044.23295-4-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jgross@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.