[libvirt] [PATCH] Fix build for older gcc

With gcc 4.3.4 I'm seeing the following warning failure cc1: warnings being treated as errors cc1: error: -funit-at-a-time is required for inlining of functions that are only called once [-Wdisabled-optimization] Add -funit-at-a-time to WARN_CFLAGS. --- m4/virt-compile-warnings.m4 | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 819da8f..8df6f9c 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -112,6 +112,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ gl_WARN_ADD([-fexceptions]) gl_WARN_ADD([-fasynchronous-unwind-tables]) gl_WARN_ADD([-fdiagnostics-show-option]) + gl_WARN_ADD([-funit-at-a-time]) if test "$enable_compile_warnings" = "error" then -- 1.7.3.1

On 04/06/2011 03:10 PM, Jim Fehlig wrote:
With gcc 4.3.4 I'm seeing the following warning failure
cc1: warnings being treated as errors cc1: error: -funit-at-a-time is required for inlining of functions that are only called once [-Wdisabled-optimization]
Add -funit-at-a-time to WARN_CFLAGS. ---
ACK, please push (I'm seeing the same thing on Cygwin, where gcc is also at 4.3.4). -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Eric Blake wrote:
On 04/06/2011 03:10 PM, Jim Fehlig wrote:
With gcc 4.3.4 I'm seeing the following warning failure
cc1: warnings being treated as errors cc1: error: -funit-at-a-time is required for inlining of functions that are only called once [-Wdisabled-optimization]
Add -funit-at-a-time to WARN_CFLAGS. ---
ACK, please push (I'm seeing the same thing on Cygwin, where gcc is also at 4.3.4).
Ok, pushed. Thanks.
participants (2)
-
Eric Blake
-
Jim Fehlig