This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: VAX Ultrix bootstrap failure with gcc-2.96
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Subject: Re: VAX Ultrix bootstrap failure with gcc-2.96
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Wed, 24 May 2000 13:25:09 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org, egcs-bugs at sourceware dot cygnus dot com
> cc1: Invalid option `-Wno-long-long'
> In file included from ../../gcc/cppmain.c:25:
> ../../gcc/cpplib.h:189: warning: ANSI C does not support `long long'
After several false starts, I think the following patch is a reasonable
approach to fixing the problem. The definition of the warning CFLAGS
for stage 1 and 2 is moved to configure. The configure code could be
easily modified to support more option tests if that is needed at some
point in the future.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-05-24 J. David Anglin <dave@hiauly.hia.nrc.ca>
* configure.in: Check for -Wno-long-long option support and improve
handling of warning CFLAGS for stages 1 and 2.
* Makefile.in (WARN_CFLAGS): Move definition to configure.in.
* configure: Regenerate.
--- configure.in.orig Wed May 24 12:11:28 2000
+++ configure.in Wed May 24 12:48:20 2000
@@ -329,15 +329,30 @@
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'.
+stage1_warn_cflags=" -W -Wall -Wtraditional -pedantic -Wwrite-strings"
+stage2_warn_cflags="$stage1_warn_cflags -Wno-long-long"
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="$stage1_warn_cflags -Wno-long-long"
+ fi
else
stage1_warn_cflags=""
fi
AC_SUBST(stage1_warn_cflags)
+AC_SUBST(stage2_warn_cflags)
AC_PROG_MAKE_SET
--- Makefile.in.orig Sun May 21 14:10:51 2000
+++ Makefile.in Wed May 24 12:48:21 2000
@@ -76,7 +76,7 @@
TCFLAGS =
CFLAGS = -g @stage1_warn_cflags@
BOOT_CFLAGS = -O2 $(CFLAGS)
-WARN_CFLAGS = -W -Wall -Wtraditional -pedantic -Wno-long-long -Wwrite-strings
+WARN_CFLAGS = @stage2_warn_cflags@
LOOSE_CFLAGS = `echo $(CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =