* [PATCH] fix libfdt_env.h for RHEL7 @ 2017-03-03 16:29 Paolo Bonzini [not found] ` <1488558597-21364-1-git-send-email-pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Paolo Bonzini @ 2017-03-03 16:29 UTC (permalink / raw) To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA; +Cc: dgibson-H+wXaHxf7aLQT0dZR+AlfA 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> --- David, it would be nice to have this in QEMU 2.9 but I am not sure of the mechanics of that. libfdt/libfdt_env.h | 2 ++ 1 file changed, 2 insertions(+) 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1488558597-21364-1-git-send-email-pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] fix libfdt_env.h for RHEL7 [not found] ` <1488558597-21364-1-git-send-email-pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2017-03-06 1:25 ` David Gibson [not found] ` <20170306122557.71669b69-K0bRW+63XPQe6aEkudXLsA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: David Gibson @ 2017-03-06 1:25 UTC (permalink / raw) To: Paolo Bonzini; +Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2115 bytes --] On Fri, 3 Mar 2017 17:29:57 +0100 Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Senior Software Engineer, Virtualization, Red Hat [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20170306122557.71669b69-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>]
* Re: [PATCH] fix libfdt_env.h for RHEL7 [not found] ` <20170306122557.71669b69-K0bRW+63XPQe6aEkudXLsA@public.gmane.org> @ 2017-03-06 12:52 ` Paolo Bonzini [not found] ` <88992ad1-f92f-7006-3b78-6b2e631f4110-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Paolo Bonzini @ 2017-03-06 12:52 UTC (permalink / raw) To: David Gibson; +Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA On 06/03/2017 02:25, David Gibson wrote: > 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. Yes, it is for the submodule. Because QEMU now requires 1.4.2, the submodule is needed to compile QEMU on past RHEL releases. Maybe we can "#undef __bitwise" or something like that. Paolo ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <88992ad1-f92f-7006-3b78-6b2e631f4110-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] fix libfdt_env.h for RHEL7 [not found] ` <88992ad1-f92f-7006-3b78-6b2e631f4110-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2017-03-08 1:44 ` David Gibson 0 siblings, 0 replies; 4+ messages in thread From: David Gibson @ 2017-03-08 1:44 UTC (permalink / raw) To: Paolo Bonzini; +Cc: David Gibson, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1199 bytes --] On Mon, Mar 06, 2017 at 01:52:54PM +0100, Paolo Bonzini wrote: > > > On 06/03/2017 02:25, David Gibson wrote: > > 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. > > Yes, it is for the submodule. Because QEMU now requires 1.4.2, the > submodule is needed to compile QEMU on past RHEL releases. Maybe we can > "#undef __bitwise" or something like that. Hm. I wonder why I haven't hit that with my own recent builds. I guess they were on Power, maybe the problematic symbol is only on the x86 libc. The problem should go away in not too long - Mirek is packaging dtc 1.4.3 for RHEL. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-08 1:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-03 16:29 [PATCH] fix libfdt_env.h for RHEL7 Paolo Bonzini [not found] ` <1488558597-21364-1-git-send-email-pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2017-03-06 1:25 ` David Gibson [not found] ` <20170306122557.71669b69-K0bRW+63XPQe6aEkudXLsA@public.gmane.org> 2017-03-06 12:52 ` Paolo Bonzini [not found] ` <88992ad1-f92f-7006-3b78-6b2e631f4110-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2017-03-08 1:44 ` David Gibson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).