RE: [PATCH v1 1/1] include/hw/xen/xen_native.h: downgrade include-order assertion to warning

"Frager, Neal" <[email protected]>
Newsgroups org.xenproject.lists.xen-devel,org.nongnu.qemu-devel
Message-ID <BL1PR12MB5032F21E0E2A6F17398B6D76F0A02@BL1PR12MB5032.namprd12.prod.outlook.com>
AMD General

Hi Stewart,

> The -I$(XEN_ROOT)/tools/include added to QEMU's extra-cflags causes
> __XEN_INTERFACE_VERSION__ to be defined before xen_native.h is included,
> triggering an include-order assertion. Downgrade to a warning since the
> version is consistent in cross-compile.
> Ref: https://github.com/qemu/qemu/commit/e2abfe5ec6
>
> Signed-off-by: Neal Frager <[email protected]>
> Signed-off-by: Vincent Stehlé <[email protected]>
> ---
>  include/hw/xen/xen_native.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
> index 5caf91a616..3e1137efc1 100644
> --- a/include/hw/xen/xen_native.h
> +++ b/include/hw/xen/xen_native.h
> @@ -2,7 +2,7 @@
>  #define QEMU_HW_XEN_NATIVE_H
>
>  #ifdef __XEN_INTERFACE_VERSION__
> -#error In Xen native files, include xen_native.h before other Xen headers
> +#warning In Xen native files, include xen_native.h before other Xen headers
>  #endif
>
>  /*


> This is a buildroot issue, so I don't believe it's necessary to fix from the
> qemu side.

I am not sure I fully agree here. While this is a buildroot identified issue,
there could be other use cases for __XEN_INTERFACE_VERSION__ to be defined
before xen_native.h is included. And what we have found is that if
__XEN_INTERFACE_VERSION__ to be defined before xen_native.h is included, it
is not a hard error.  For buildroot, the qemu works just fine in spite of
this.

Since it is not a hard error condition, I still believe it should be
downgraded to a warning instead of an error.

And thus, I would still like this patch to be considered for the upstream
qemu.

Best regards,
Neal Frager
AMD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.