* configure.in (top level bootstrap support): Rework --enable-werror
authorNathanael Nerode <neroden@gcc.gnu.org>
Wed, 24 Mar 2004 22:34:31 +0000 (22:34 +0000)
committerNathanael Nerode <neroden@gcc.gnu.org>
Wed, 24 Mar 2004 22:34:31 +0000 (22:34 +0000)
to set @stage2_werror_flag@.
* configure: Regenerate.
* Makefile.tpl (top level bootstrap support): Pass
@stage2_werror_flag@ down to configure in stages 2 and 3.
* Makefile.in: Regenerate.

ChangeLog
Makefile.in
Makefile.tpl
configure
configure.in

index 63163f18f9e7b6d4446bd67087b748abff601b08..9485411f7fd5e00bcb91e8ed9c03a25ad3c86cf6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-24  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * configure.in (top level bootstrap support): Rework --enable-werror
+       to set @stage2_werror_flag@.
+       * configure: Regenerate.
+       * Makefile.tpl (top level bootstrap support): Pass
+       @stage2_werror_flag@ down to configure in stages 2 and 3.
+       * Makefile.in: Regenerate.
+
 2004-03-23  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * Makefile.tpl (new-bootstrap): Set CC and CC_FOR_BUILD in configure
index 888179146b835543d1a0a8e3713a3bbfd7c9828c..2a88b90fad896f6e717a52f29b267e6c388ee4ab 100644 (file)
@@ -24046,6 +24046,8 @@ all-stage1-gcc: configure-stage1-gcc prebootstrap
        $(STAMP) all-stage1-gcc
 
 # TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally)
+# Possibly pass --enable-werror-always (depending on --enable-werror);
+# that's what @stage2_werror_flag@ is for
 configure-stage2-gcc: all-stage1-gcc
        echo configure-stage2-gcc > stage_last ; \
        if [ -f stage2-gcc/Makefile ] ; then \
@@ -24089,7 +24091,7 @@ configure-stage2-gcc: all-stage1-gcc
            libsrcdir="$$s/gcc";; \
        esac; \
        $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} ; \
+         $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
        cd .. ; \
        mv gcc stage2-gcc ; \
        mv prev-gcc stage1-gcc ; \
@@ -24163,7 +24165,7 @@ configure-stage3-gcc: all-stage2-gcc
            libsrcdir="$$s/gcc";; \
        esac; \
        $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} ; \
+         $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
        cd .. ; \
        mv gcc stage3-gcc ; \
        mv prev-gcc stage2-gcc ; \
index e486dfeda653309aa8dbc041df600643559333d5..4fef85bf335c17f5da83a0d185fbd90e45b2f983 100644 (file)
@@ -1374,6 +1374,8 @@ all-stage1-gcc: configure-stage1-gcc prebootstrap
        $(STAMP) all-stage1-gcc
 
 # TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally)
+# Possibly pass --enable-werror-always (depending on --enable-werror);
+# that's what @stage2_werror_flag@ is for
 configure-stage2-gcc: all-stage1-gcc
        echo configure-stage2-gcc > stage_last ; \
        if [ -f stage2-gcc/Makefile ] ; then \
@@ -1417,7 +1419,7 @@ configure-stage2-gcc: all-stage1-gcc
            libsrcdir="$$s/gcc";; \
        esac; \
        $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} ; \
+         $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
        cd .. ; \
        mv gcc stage2-gcc ; \
        mv prev-gcc stage1-gcc ; \
@@ -1491,7 +1493,7 @@ configure-stage3-gcc: all-stage2-gcc
            libsrcdir="$$s/gcc";; \
        esac; \
        $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} ; \
+         $(HOST_CONFIGARGS) $${srcdiroption} @stage2_werror_flag@ ; \
        cd .. ; \
        mv gcc stage3-gcc ; \
        mv prev-gcc stage2-gcc ; \
index a884c3281bf28fe5a319582c42296d7d0c31f006..a674ab6b6fa58900792211ff9ea656d6bd0e3c93 100755 (executable)
--- a/configure
+++ b/configure
@@ -4484,9 +4484,9 @@ else
   enable_werror=yes
 fi
 
-case ${enable_error} in
-  yes) WERROR=-Werror ;;
-  *) WERROR= ;;
+case ${enable_werror} in
+  yes) stage2_werror_flag="--enable-werror-always" ;;
+  *) stage2_werror_flag="" ;;
 esac
 
 
@@ -4745,7 +4745,7 @@ s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
 s%@MAINT@%$MAINT%g
 s%@stage1_cflags@%$stage1_cflags%g
-s%@WERROR@%$WERROR%g
+s%@stage2_werror_flag@%$stage2_werror_flag%g
 
 CEOF
 EOF
index 0a9f05fd8fc37d88c6f2046df93f6c884ad425b5..5735d84c8b4ab4850c88e350b5099b874b30f5ed 100644 (file)
@@ -2129,10 +2129,10 @@ AC_SUBST(stage1_cflags)
 AC_ARG_ENABLE(werror,
 [  --enable-werror         enable -Werror in bootstrap stage2 and later], [],
 [enable_werror=yes])
-case ${enable_error} in
-  yes) WERROR=-Werror ;;
-  *) WERROR= ;;
+case ${enable_werror} in
+  yes) stage2_werror_flag="--enable-werror-always" ;;
+  *) stage2_werror_flag="" ;;
 esac
-AC_SUBST(WERROR)
+AC_SUBST(stage2_werror_flag)
 
 AC_OUTPUT(Makefile)