Re: [PATCH] fix libfdt_env.h for RHEL7

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



On Fri,  3 Mar 2017 17:29:57 +0100
Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:

> RHEL7 defines __bitwise to "__bitwise__" in /usr/include/linux/types.h.
> Because QEMU uses -Werror, the redefinition of the macro in libfdt_env.h
> is is causing QEMU's build to fail when it includes libfdt.h.
> 
> This is the minimal fix, but a better one in the long term is probably
> to define libfdt-specific macros LIBFDT_FORCE and LIBFDT_BITWISE.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> ---
> 	David, it would be nice to have this in QEMU 2.9 but I
> 	am not sure of the mechanics of that.

Urgh.  So from an upstream libfdt perspective, I'd prefer to go
straight to the long term fix - it's not that much more complicated.
And, in fact, I have now done so.  It also reminded me to actually do a
sparse check and fix some warnings.

It would be nice to have in qemu 2.9, but having just made a dtc
release and updated the qemu submodule, I'm not too keen on doing so
again almost immediately afterwards.  So I'm inclined to leave this
unless there's a more compelling reason than I can see for now.

I'm not sure which your primary concern is:

1) For the RHEL release itself.  I don't think updating the qemu module
is terribly relevant for this, since we build against the packaged
libfdt rather than the qemu submodule.  We could ask Mirek to pull the
define fix into the downstream libfdt package.

2) For building upstream qemu on RHEL, using the submodule.  I don't
have a good answer for this one.

> diff --git a/libfdt/libfdt_env.h b/libfdt/libfdt_env.h
> index 9dea97d..2cf0826 100644
> --- a/libfdt/libfdt_env.h
> +++ b/libfdt/libfdt_env.h
> @@ -60,6 +60,8 @@
>  #define __force __attribute__((force))
>  #define __bitwise __attribute__((bitwise))
>  #else
> +#undef __force
> +#undef __bitwise
>  #define __force
>  #define __bitwise
>  #endif
> -- 
> 1.8.3.1
> 


-- 
David Gibson <dgibson@xxxxxxxxxx>
Senior Software Engineer, Virtualization, Red Hat

Attachment: pgpIReumuC4GN.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux