[libvirt] [PATCH 3/3] build: avoid frame size error when building without -O2

Eric Blake eblake at redhat.com
Mon Mar 26 19:41:25 UTC 2012


On 03/26/2012 12:53 PM, Laine Stump wrote:
> libvirt always adds -Werror-frame-larger-than=4096 to the flags when
> it builds. When building on Fedora 17, two functions with multiple
> 1024 buffers declared inside if {} blocks would generate frame size
> errors; apparently the version of gcc on Fedora 16 will merge these
> multiple buffers into a single buffer even when optimization is off,
> but Fedora 17 won't.
> 
> The fix is to declare a single 1024 buffer at the top of the two
> offending functions, and reuse the single buffer throughout the
> functions.
> ---
>  src/libxl/libxl_driver.c |    5 +----
>  src/qemu/qemu_driver.c   |   10 ++--------
>  2 files changed, 3 insertions(+), 12 deletions(-)

ACK.

-- 
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/20120326/34ddced6/attachment-0001.sig>


More information about the libvir-list mailing list