[PATCH] spec: Use --enable-werror on RHEL

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

 



As RHEL provides a stable tool chain, we don't have to worry about
frequent changes in reported compiler warnings (which prevents us from
enabling -Werror unconditionally).
---
 libvirt.spec.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index e74f774..6d6203b 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -352,6 +352,14 @@
 %endif
 
 
+# RHEL releases provide stable tool chains and so it is safe to turn
+# compiler warning into errors without being worried about frequent
+# changes in reported warnings
+%if 0%{?rhel}
+    %define enable_werror --enable-werror
+%endif
+
+
 Summary: Library providing a simple virtualization API
 Name: libvirt
 Version: @VERSION@
@@ -1386,6 +1394,7 @@ of recent versions of Linux (and other OSes).
            %{with_packager_version} \
            --with-qemu-user=%{qemu_user} \
            --with-qemu-group=%{qemu_group} \
+           %{?enable_werror} \
            %{init_scripts}
 make %{?_smp_mflags}
 gzip -9 ChangeLog
-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]