[libvirt] [PATCH] build: allow building with newer glibc-headers and -O0

Eric Blake eblake at redhat.com
Thu Jun 7 13:24:30 UTC 2012


On 06/07/2012 06:45 AM, Christophe Fergeau wrote:
> On Thu, Jun 07, 2012 at 06:25:40AM -0600, Eric Blake wrote:
>> On 06/07/2012 05:24 AM, Christophe Fergeau wrote:
>>> Using a #ifdef would be more correct:
>>
>> Only if you care about -Wundef, which we don't.  But I agree that if
>> other projects are copying this trick to work around glibc's braindead
>> choice of making this warning verbose, then those projects may have to
>> consider this fact.
> 
> Yes, I've tried reusing this change in other projects (libosinfo) which
> also use -Wundef which gave me this warning. I felt it was better to use
> the same 'code' in libvirt and these projects, hence this email ;)
> But I agree it's not needed in libvirt, I'm fine if thing are kept this
> way.

If the argument is that we want to make the autoconf snippet easier to
copy elsewhere, then I don't mind applying a patch that uses:

#if defined __OPTIMIZE__ && __OPTIMIZE__

as the gate in the AH_VERBATIM block of code.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120607/f68feb1a/attachment-0001.sig>


More information about the libvir-list mailing list