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


 > From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
 > 
 > It also adds a test to see if ${CC-cc} supports -Wno-long-long.
 > If gcc is being used for stage1, the stage1_warn_cflags are set to
 > " -W -Wall -Wtraditional -pedantic -Wwrite-strings" when gcc doesn't
 > support -Wno-long-long, and to $(WARN_CFLAGS) when it does.
 > 
 >  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.)

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.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

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