Commit 487fefdb1e94098ea734cb10e9e17d5860dde2d1

Authored by Anthony Liguori
1 parent ce24e07b

Enable -Werror by default for git builds on Linux hosts

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>
Showing 1 changed file with 13 additions and 5 deletions
configure
@@ -356,11 +356,7 @@ else @@ -356,11 +356,7 @@ else
356 fi 356 fi
357 [ -f "$workdir/vl.c" ] || source_path_used="yes" 357 [ -f "$workdir/vl.c" ] || source_path_used="yes"
358 358
359 -werror="no"  
360 -# generate compile errors on warnings for development builds  
361 -#if grep cvs $source_path/VERSION > /dev/null 2>&1 ; then  
362 -#werror="yes";  
363 -#fi 359 +werror=""
364 360
365 for opt do 361 for opt do
366 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` 362 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
@@ -657,6 +653,18 @@ if test ! -x &quot;$(which cgcc 2&gt;/dev/null)&quot;; then @@ -657,6 +653,18 @@ if test ! -x &quot;$(which cgcc 2&gt;/dev/null)&quot;; then
657 sparse="no" 653 sparse="no"
658 fi 654 fi
659 655
  656 +# Consult white-list to determine whether to enable werror
  657 +# by default. Only enable by default for git builds
  658 +if test -z "$werror" ; then
  659 + z_version=`cut -f3 -d. $source_path/VERSION`
  660 + if test "$z_version" = "50" -a \
  661 + "$linux" = "yes" ; then
  662 + werror="yes"
  663 + else
  664 + werror="no"
  665 + fi
  666 +fi
  667 +
660 # 668 #
661 # Solaris specific configure tool chain decisions 669 # Solaris specific configure tool chain decisions
662 # 670 #