]> git.proxmox.com Git - qemu.git/commitdiff
Enable -Werror by default for git builds on Linux hosts
authorAnthony Liguori <aliguori@us.ibm.com>
Thu, 11 Jun 2009 18:28:25 +0000 (13:28 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 12 Jun 2009 18:56:34 +0000 (13:56 -0500)
Additional hosts can be added to the white list as they are confirmed to build
with --enable-werror.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure

index 89e7f5362a6ee243bfb2b3ffd2b141d3a93e5fee..48c8949a4a9e98d6126d6ef796cda3f52a399656 100755 (executable)
--- a/configure
+++ b/configure
@@ -356,11 +356,7 @@ else
 fi
 [ -f "$workdir/vl.c" ] || source_path_used="yes"
 
-werror="no"
-# generate compile errors on warnings for development builds
-#if grep cvs $source_path/VERSION > /dev/null 2>&1 ; then
-#werror="yes";
-#fi
+werror=""
 
 for opt do
   optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
@@ -657,6 +653,18 @@ if test ! -x "$(which cgcc 2>/dev/null)"; then
     sparse="no"
 fi
 
+# Consult white-list to determine whether to enable werror
+# by default.  Only enable by default for git builds
+if test -z "$werror" ; then
+    z_version=`cut -f3 -d. $source_path/VERSION`
+    if test "$z_version" = "50" -a \
+       "$linux" = "yes" ; then
+       werror="yes"
+    else
+       werror="no"
+    fi
+fi
+
 #
 # Solaris specific configure tool chain decisions
 #