Commit 487fefdb1e94098ea734cb10e9e17d5860dde2d1
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 | 356 | fi |
357 | 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 | 361 | for opt do |
366 | 362 | optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` |
... | ... | @@ -657,6 +653,18 @@ if test ! -x "$(which cgcc 2>/dev/null)"; then |
657 | 653 | sparse="no" |
658 | 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 | 669 | # Solaris specific configure tool chain decisions |
662 | 670 | # | ... | ... |