diff mbox series

[XEN,for-4.17] libs/light: Fix build, fix missing _libxl_types_json.h

Message ID 20221025111632.36286-1-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series [XEN,for-4.17] libs/light: Fix build, fix missing _libxl_types_json.h | expand

Commit Message

Anthony PERARD Oct. 25, 2022, 11:16 a.m. UTC
Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE)
before starting to build the different objects.

Make sure that the generated headers are copied into $(XEN_INCLUDE)
before using them. This is achieved by telling make about which
headers are needed to use "libxl_internal.h" which use "libxl_json.h"
which uses "_libxl_types_json.h". "libxl_internal.h" also uses
"libxl.h" so add it to the list.

This also prevent `gcc` from using a potentially installed headers
from a previous version of Xen.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

This is part of in review patch "libs/light: Rework targets
prerequisites", but that much smaller patch should be enough to fix
potential build issues.

This patch fix for example `make _libxl_types.o`, when libxl generated
headers aren't generated yet, and tools/light is clean.

For 4.17:
    build fix.
---
 tools/libs/light/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Henry Wang Oct. 25, 2022, 11:23 a.m. UTC | #1
Hi Anthony,

> -----Original Message-----
> From: Anthony PERARD <anthony.perard@citrix.com>
> Subject: [XEN PATCH for-4.17] libs/light: Fix build, fix missing
> _libxl_types_json.h
> 
> Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE)
> before starting to build the different objects.
> 
> Make sure that the generated headers are copied into $(XEN_INCLUDE)
> before using them. This is achieved by telling make about which
> headers are needed to use "libxl_internal.h" which use "libxl_json.h"
> which uses "_libxl_types_json.h". "libxl_internal.h" also uses
> "libxl.h" so add it to the list.
> 
> This also prevent `gcc` from using a potentially installed headers
> from a previous version of Xen.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry
Jan Beulich Oct. 25, 2022, 11:54 a.m. UTC | #2
On 25.10.2022 13:16, Anthony PERARD wrote:
> Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE)
> before starting to build the different objects.
> 
> Make sure that the generated headers are copied into $(XEN_INCLUDE)
> before using them. This is achieved by telling make about which
> headers are needed to use "libxl_internal.h" which use "libxl_json.h"
> which uses "_libxl_types_json.h". "libxl_internal.h" also uses
> "libxl.h" so add it to the list.
> 
> This also prevent `gcc` from using a potentially installed headers
> from a previous version of Xen.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile
index d681269229..374be1cfab 100644
--- a/tools/libs/light/Makefile
+++ b/tools/libs/light/Makefile
@@ -209,6 +209,7 @@  _libxl_save_msgs_helper.h _libxl_save_msgs_callout.h: \
 
 $(XEN_INCLUDE)/libxl.h: $(XEN_INCLUDE)/_libxl_types.h
 $(XEN_INCLUDE)/libxl_json.h: $(XEN_INCLUDE)/_libxl_types_json.h
+libxl_internal.h: $(XEN_INCLUDE)/libxl.h $(XEN_INCLUDE)/libxl_json.h
 libxl_internal.h: _libxl_types_internal.h _libxl_types_private.h _libxl_types_internal_private.h
 libxl_internal_json.h: _libxl_types_internal_json.h