This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: VAX Ultrix bootstrap failure: cc: -o would overwrite
- To: ghazi at caip dot rutgers dot edu (Kaveh R. Ghazi)
- Subject: Re: VAX Ultrix bootstrap failure: cc: -o would overwrite
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Mon, 22 May 2000 14:29:05 -0400 (EDT)
- Cc: egcs-bugs at egcs dot cygnus dot com, gcc-patches at gcc dot gnu dot org, law at cygnus dot com
> > if test "x$GCC" = "xyes"; then
> > - stage1_warn_cflags='$(WARN_CFLAGS)'
> > + if test $ac_cv_prog_cc_no_long_long = yes; then
> > + stage1_warn_cflags='$(WARN_CFLAGS)'
> > + else
> > + stage1_warn_cflags=" -W -Wall -Wtraditional -pedantic -Wwrite-strings"
> > + fi
> > else
> > stage1_warn_cflags=""
> > fi
>
> This causes us to maintain the warning flag list in two places, one in
> Makefile.in and one in configure.in. A better scheme would be to use
> "sed" to remove -Wno-long-long from WARN_CFLAGS when gcc doesn't
> support it. (Look at LOOSE_CFLAGS in gcc/Makefile.in for an example.)
Good point. I changed the substitution when stage1_warn_cflags=no to
remove -Wno-long-long for WARN_CFLAGS.
> Try to only nuke -Wno-long-long if gcc version < 2.8. Or if you
> really want to get fancy, iterate over all the WARN_CFLAGS and
> determine which ones are supported in the stage1 gcc. That way when
> newer warning flags are added it will still work.
-Wno-long-long is only nuked when it is not supported. I don't know
which versions actually support it.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
--- configure.in.orig Thu May 18 19:41:11 2000
+++ configure.in Mon May 22 14:11:57 2000
@@ -322,18 +322,32 @@
# Find the native compiler
AC_PROG_CC
AC_PROG_CC_C_O
-if test $ac_cv_prog_cc_${ac_cc}_c_o = no; then
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
NO_MINUS_C_MINUS_O=yes
fi
AC_SUBST(NO_MINUS_C_MINUS_O)
gcc_AC_C_LONG_DOUBLE
+AC_MSG_CHECKING(whether ${CC-cc} accepts -Wno-long-long)
+echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -Wno-long-long -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_no_long_long=yes
+else
+ ac_cv_prog_cc_no_long_long=no
+fi
+rm -f conftest*
+echo "$ac_t"$ac_cv_prog_cc_no_long_long 1>&6
+
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
if test "x$GCC" = "xyes"; then
- stage1_warn_cflags='$(WARN_CFLAGS)'
+ if test $ac_cv_prog_cc_no_long_long = yes; then
+ stage1_warn_cflags='$(WARN_CFLAGS)'
+ else
+ stage1_warn_cflags='`echo $(WARN_CFLAGS)|sed -e s/-Wno-long-long//g`'
+ fi
else
stage1_warn_cflags=""
fi