* [PATCH] Enable by default -Werror just for bootstrap-debug.mk.
@ 2017-05-17 8:51 Martin Liška
2017-05-19 11:30 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Martin Liška @ 2017-05-17 8:51 UTC (permalink / raw)
To: GCC Patches; +Cc: Richard Biener
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
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
[-- Attachment #2: 0001-Enable-by-default-Werror-just-for-bootstrap-debug.mk.patch --]
[-- Type: text/x-patch, Size: 2188 bytes --]
From 93a314f17d5cf75e7ecd5cb03a052842aaf30b4f Mon Sep 17 00:00:00 2001
From: marxin <mliska@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 <mliska@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Enable by default -Werror just for bootstrap-debug.mk.
2017-05-17 8:51 [PATCH] Enable by default -Werror just for bootstrap-debug.mk Martin Liška
@ 2017-05-19 11:30 ` Richard Biener
2017-05-19 13:06 ` Martin Liška
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2017-05-19 11:30 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
On Wed, May 17, 2017 at 10:45 AM, Martin Liška <mliska@suse.cz> wrote:
> 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?
Hmm, this enables werror on release branches. I think we also want to
enable Werror for
--without-build-config (or =yes and =no), thus regular bootstrap
without bootstrap-debug.
Richard.
> Martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Enable by default -Werror just for bootstrap-debug.mk.
2017-05-19 11:30 ` Richard Biener
@ 2017-05-19 13:06 ` Martin Liška
2017-05-19 13:19 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Martin Liška @ 2017-05-19 13:06 UTC (permalink / raw)
To: Richard Biener; +Cc: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
On 05/19/2017 01:24 PM, Richard Biener wrote:
> On Wed, May 17, 2017 at 10:45 AM, Martin Liška <mliska@suse.cz> wrote:
>> 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?
>
> Hmm, this enables werror on release branches. I think we also want to
> enable Werror for
> --without-build-config (or =yes and =no), thus regular bootstrap
> without bootstrap-debug.
Ok, fixed in attached patch v2.
Martin
>
> Richard.
>
>> Martin
[-- Attachment #2: 0001-Enable-by-default-Werror-just-for-bootstrap-debug.mk-v2.patch --]
[-- Type: text/x-patch, Size: 2445 bytes --]
From d7ad1fbd517f0f61be6c2e1d2770d44a37e90c4c Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 19 May 2017 14:54:19 +0200
Subject: [PATCH] Enable by default -Werror just for bootstrap-debug.mk and
default build.
ChangeLog:
2017-05-19 Martin Liska <mliska@suse.cz>
* configure.ac: Add --enable-werror-always just for
bootstrap-debug (or none build config) and do not add it
when we are on a release branch.
* configure: Regenerated.
---
configure | 16 ++++++++++------
configure.ac | 17 +++++++++++------
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index 32a38633ad8..2c2fe644cfa 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,16 @@ case ${enable_werror} in
*) stage2_werror_flag="" ;;
esac
+if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ stage2_werror_flag="--enable-werror-always" ;;
+ "")
+ stage2_werror_flag="--enable-werror-always" ;;
+ esac
+fi
+
+
# Enable --enable-host-shared.
# Check whether --enable-host-shared was given.
diff --git a/configure.ac b/configure.ac
index 12377499295..865dd543fa3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3461,16 +3461,21 @@ 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
+
+if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ stage2_werror_flag="--enable-werror-always" ;;
+ "")
+ stage2_werror_flag="--enable-werror-always" ;;
+ esac
+fi
+
AC_SUBST(stage2_werror_flag)
# Enable --enable-host-shared.
--
2.12.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Enable by default -Werror just for bootstrap-debug.mk.
2017-05-19 13:06 ` Martin Liška
@ 2017-05-19 13:19 ` Richard Biener
2017-05-31 13:31 ` [PATCH] Fix configure.ac to respect --{enable,disable}-werror option Martin Liška
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2017-05-19 13:19 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
On Fri, May 19, 2017 at 2:56 PM, Martin Liška <mliska@suse.cz> wrote:
> On 05/19/2017 01:24 PM, Richard Biener wrote:
>> On Wed, May 17, 2017 at 10:45 AM, Martin Liška <mliska@suse.cz> wrote:
>>> 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?
>>
>> Hmm, this enables werror on release branches. I think we also want to
>> enable Werror for
>> --without-build-config (or =yes and =no), thus regular bootstrap
>> without bootstrap-debug.
>
> Ok, fixed in attached patch v2.
Looks good to me.
Thanks,
Richard.
> Martin
>
>>
>> Richard.
>>
>>> Martin
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Fix configure.ac to respect --{enable,disable}-werror option.
2017-05-19 13:19 ` Richard Biener
@ 2017-05-31 13:31 ` Martin Liška
2017-05-31 13:47 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Martin Liška @ 2017-05-31 13:31 UTC (permalink / raw)
To: Richard Biener; +Cc: GCC Patches, David Edelsohn
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
Hi.
One has to set stage2_werror_flags in action-if-{not,}-given
in order to properly respect the configure option.
Ready to be installed?
Martin
[-- Attachment #2: 0001-Fix-configure.ac-to-respect-enable-disable-werror-op.patch --]
[-- Type: text/x-patch, Size: 2085 bytes --]
From 77244d330010b2a17ca81fc866e2904e2f3fece0 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Wed, 31 May 2017 15:27:05 +0200
Subject: [PATCH] Fix configure.ac to respect --{enable,disable}-werror option.
ChangeLog:
2017-05-31 Martin Liska <mliska@suse.cz>
* configure.ac: Add handling of stage2_werror_flags to
action-if-given and to action-if-not-given.
* configure: Regenerate.
---
configure | 7 +++++--
configure.ac | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 82aa619fad1..2cbb4b7ab9d 100755
--- a/configure
+++ b/configure
@@ -14641,13 +14641,13 @@ fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror;
-fi
-
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
esac
+else
+
if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
case $BUILD_CONFIG in
bootstrap-debug)
@@ -14657,6 +14657,9 @@ if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental;
esac
fi
+fi
+
+
# Specify what files to not compare during bootstrap.
diff --git a/configure.ac b/configure.ac
index 78d2d593106..82faf06946d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3508,12 +3508,14 @@ 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])], [], [])
+ [enable -Werror in bootstrap stage2 and later])],
+[
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
esac
-
+],
+[
if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
case $BUILD_CONFIG in
bootstrap-debug)
@@ -3522,6 +3524,7 @@ if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental;
stage2_werror_flag="--enable-werror-always" ;;
esac
fi
+])
AC_SUBST(stage2_werror_flag)
--
2.12.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix configure.ac to respect --{enable,disable}-werror option.
2017-05-31 13:31 ` [PATCH] Fix configure.ac to respect --{enable,disable}-werror option Martin Liška
@ 2017-05-31 13:47 ` Richard Biener
0 siblings, 0 replies; 6+ messages in thread
From: Richard Biener @ 2017-05-31 13:47 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches, David Edelsohn
On Wed, May 31, 2017 at 3:31 PM, Martin Liška <mliska@suse.cz> wrote:
> Hi.
>
> One has to set stage2_werror_flags in action-if-{not,}-given
> in order to properly respect the configure option.
>
> Ready to be installed?
Ok.
Richard.
> Martin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-31 13:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 8:51 [PATCH] Enable by default -Werror just for bootstrap-debug.mk Martin Liška
2017-05-19 11:30 ` Richard Biener
2017-05-19 13:06 ` Martin Liška
2017-05-19 13:19 ` Richard Biener
2017-05-31 13:31 ` [PATCH] Fix configure.ac to respect --{enable,disable}-werror option Martin Liška
2017-05-31 13:47 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).