This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix configure.ac to respect --{enable,disable}-werror option.


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
>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]