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]

Re: VAX Ultrix bootstrap failure: cc: -o would overwrite


Scratch the last.  It isn't correct.

> 
> > 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.)
> 
> The sed trick didn't work.  It resulted in multiple commands nested 
> in backquotes.  As a compromise, I reverted to the patch enclosed.
> 
> 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 19:51:24 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) -Wno-long-long'
> +  else
> +    stage1_warn_cflags='$(WARN_CFLAGS)'
> +  fi
>  else
>    stage1_warn_cflags=""
>  fi
> --- Makefile.in.orig	Fri May 19 23:02:45 2000
> +++ Makefile.in	Mon May 22 19:49:28 2000
> @@ -67,7 +67,8 @@
>  # (And for stage 1 if the native compiler is GCC.)  It is
>  # separate from BOOT_CFLAGS because people tend to override optimization
>  # flags and we'd like them to still have warnings turned on.  They are free
> -# to explicitly turn warnings off if they wish.
> +# to explicitly turn warnings off if they wish.  -Wno-long-long is added
> +# by configure to WARN_CFLAGS if the compiler used for stage1 supports it.
>  # LOOSE_CFLAGS are the CFLAGS to use when compiling something which is only
>  # compiled with gcc, such as libgcc and the frontends other than C.
>  # XCFLAGS is used for most compilations but not when using the GCC just built.
> @@ -76,7 +77,7 @@
>  TCFLAGS =
>  CFLAGS = -g @stage1_warn_cflags@
>  BOOT_CFLAGS = -O2 $(CFLAGS)
> -WARN_CFLAGS = -W -Wall -Wtraditional -pedantic -Wno-long-long -Wwrite-strings
> +WARN_CFLAGS = -W -Wall -Wtraditional -pedantic -Wwrite-strings
>  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)

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