[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] tools/libs: Check ABI # DO NOT APPLY YET


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 1 Mar 2021 17:00:44 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Mon, 01 Mar 2021 17:01:26 +0000
  • Ironport-sdr: k1jckH8qiAXyMvWlee/mBx99CGcwRw0gaUEDd8Drr9NkOz39+Nw/7Jyxtf1EMdLhpGyCvusVMA kGiW2XYgvp4D1cJaBC8v41TrFPJmxEZ/gNH4h7Ge1q4ZIacV+XZqJDxX2eAZxYxigEx1UKeVvD QyYgR6Ydn5cCvVUjXXkFrUGAfmIpPoEYgY1Khdsx69Hg9C9WSj0Jpaj8O+/KMeYOl7RFayXPM+ tAidUuS1aKD2fKCg4X8MVHUvZ7qtwFC0wjeECE29TKu79npVl9G0jipyxwAZkv3644hHZR8BzQ OWM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Ian Jackson <iwj@xxxxxxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Juergen Gross <jgross@xxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.