Hi. As discussed on IRC some time ago, there are configurations that produce -Werror=maybe-uninitialized and other warnings that break bootstrap. So that, the patch makes -Werror just for default (boostrap-debug) configuration.
Ready for trunk? Martin
>From 93a314f17d5cf75e7ecd5cb03a052842aaf30b4f Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Wed, 17 May 2017 10:39:58 +0200 Subject: [PATCH] Enable by default -Werror just for bootstrap-debug.mk. ChangeLog: 2017-05-17 Martin Liska <mli...@suse.cz> * configure: Regenerate the file. * configure.ac: Remove adding enable_werror for 'experimantal' DEP-PHASE and add it just for bootstrap-debug BUILD_CONFIG. --- configure | 12 ++++++------ configure.ac | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 32a38633ad8..66e51552746 100755 --- a/configure +++ b/configure @@ -14587,12 +14587,6 @@ fi # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; -else - if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then - enable_werror=yes -else - enable_werror=no -fi fi case ${enable_werror} in @@ -14600,6 +14594,12 @@ case ${enable_werror} in *) stage2_werror_flag="" ;; esac +# Enable -Werror only for selected build configurations. +case $BUILD_CONFIG in +bootstrap-debug) + stage2_werror_flag="--enable-werror-always" +esac + # Enable --enable-host-shared. # Check whether --enable-host-shared was given. diff --git a/configure.ac b/configure.ac index 12377499295..d622a2fca41 100644 --- a/configure.ac +++ b/configure.ac @@ -3461,16 +3461,17 @@ AC_SUBST(stage1_checking) # Enable -Werror in bootstrap stage2 and later. AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], - [enable -Werror in bootstrap stage2 and later])], [], -[if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then - enable_werror=yes -else - enable_werror=no -fi]) + [enable -Werror in bootstrap stage2 and later])], []) case ${enable_werror} in yes) stage2_werror_flag="--enable-werror-always" ;; *) stage2_werror_flag="" ;; esac + +# Enable -Werror only for selected build configurations. +case $BUILD_CONFIG in +bootstrap-debug) + stage2_werror_flag="--enable-werror-always" +esac AC_SUBST(stage2_werror_flag) # Enable --enable-host-shared. -- 2.12.2