This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: VAX Ultrix bootstrap failure with gcc-2.96
- To: gcc-bugs at gcc dot gnu dot org
- 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:37:12 -0400 (EDT)
Forwarded message:
From dave Wed May 24 13:28:53 EDT 2000
Subject: Re: VAX Ultrix bootstrap failure with gcc-2.96 (fwd)
To: egcs-bugs@egcs.cygnus.com
Date: Wed, 24 May 2000 13:28:53 -0400 (EDT)
From: "John David Anglin" <dave@hiauly1>
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 3109
Forwarded message:
>From dave Wed May 24 13:25:39 EDT 2000
Message-Id: <200005241725.NAA10242@hiauly1.hia.nrc.ca>
Subject: Re: VAX Ultrix bootstrap failure with gcc-2.96
To: dave@hiauly1.hia.nrc.ca (John David Anglin)
Date: Wed, 24 May 2000 13:25:09 -0400 (EDT)
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
Cc: gcc-patches@gcc.gnu.org, egcs-bugs@sourceware.cygnus.com
In-Reply-To: <no.id> from "John David Anglin" at May 12, 2000 00:11:25 am
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
> 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 =
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)