diff mbox series

[1/3] tools/libxentoolcore: Fill in LIBHEADERS

Message ID 20210305124949.6719-2-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series tools/libs: Multiple fixes to header handling | expand

Commit Message

Andrew Cooper March 5, 2021, 12:49 p.m. UTC
c/s 4664034cd replaced a glob over include/*.h with an expectation that
LIBHEADER was suitably set for libraries which didn't have a single,
consistently named, header file.

This wasn't true for xentoolcore, which lost xentoolcore_internal.h as a
consequence, and failed an API/ABI check vs 4.14

Fixes: 4664034cd ("tools/libs: move official headers to common directory")
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>

For 4.15.  This is a regression from 4.14, even if AFAICT it only impacts the
ABI checking at this point.

I *think* this is the only impacted library, but I would appreciate a second
pair of eyes.

I did experiment with this:

  +ifeq ($(LIBHEADER),)
  +$(warning $(LIBNAME) - No headers)
  +endif
   LIBHEADER ?= $(LIB_FILE_NAME).h
   LIBHEADERS = $(foreach h, $(LIBHEADER), $(XEN_INCLUDE)/$(h))

which yields:

  andrewcoop@andrewcoop:/local/xen.git$ make -j4 -s -C tools/libs/
  /local/xen.git/tools/libs/toollog/../../../tools/libs/libs.mk:50: toollog - No headers
  /local/xen.git/tools/libs/evtchn/../../../tools/libs/libs.mk:50: evtchn - No headers
  /local/xen.git/tools/libs/gnttab/../../../tools/libs/libs.mk:50: gnttab - No headers
  /local/xen.git/tools/libs/call/../../../tools/libs/libs.mk:50: call - No headers
  /local/xen.git/tools/libs/foreignmemory/../../../tools/libs/libs.mk:50: foreignmemory - No headers
  /local/xen.git/tools/libs/devicemodel/../../../tools/libs/libs.mk:50: devicemodel - No headers
  ../libs.mk:50: hypfs - No headers
  /local/xen.git/tools/libs/stat/../../../tools/libs/libs.mk:50: stat - No headers
  /local/xen.git/tools/libs/stat/../../../tools/libs/libs.mk:50: stat - No headers

Headers aside for a moment, there are two bugs here.  hypfs doesn't use the
same include pattern as the others, and stat is entered twice.
---
 tools/libs/toolcore/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ian Jackson March 5, 2021, 1:25 p.m. UTC | #1
Andrew Cooper writes ("[PATCH 1/3] tools/libxentoolcore: Fill in LIBHEADERS"):
> c/s 4664034cd replaced a glob over include/*.h with an expectation that
> LIBHEADER was suitably set for libraries which didn't have a single,
> consistently named, header file.
> 
> This wasn't true for xentoolcore, which lost xentoolcore_internal.h as a
> consequence, and failed an API/ABI check vs 4.14
> 
> Fixes: 4664034cd ("tools/libs: move official headers to common directory")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Jürgen Groß March 11, 2021, 1:37 p.m. UTC | #2
On 05.03.21 13:49, Andrew Cooper wrote:
> c/s 4664034cd replaced a glob over include/*.h with an expectation that
> LIBHEADER was suitably set for libraries which didn't have a single,
> consistently named, header file.
> 
> This wasn't true for xentoolcore, which lost xentoolcore_internal.h as a
> consequence, and failed an API/ABI check vs 4.14
> 
> Fixes: 4664034cd ("tools/libs: move official headers to common directory")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
diff mbox series

Patch

diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile
index 1cf30733c9..3550786491 100644
--- a/tools/libs/toolcore/Makefile
+++ b/tools/libs/toolcore/Makefile
@@ -5,6 +5,8 @@  MAJOR	= 1
 MINOR	= 0
 AUTOINCS := $(XEN_INCLUDE)/_xentoolcore_list.h
 
+LIBHEADER := xentoolcore.h xentoolcore_internal.h
+
 SRCS-y	+= handlereg.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk