------- Additional Comments From kcook at gcc dot gnu dot org 2004-11-24 18:59 ------- I'm up to three bugs here of which two are very related.
The first bug is that somewhere during bootstrap an extra space is getting tacked on CFLAGS. I'll try to track down where that happens. I'm pretty sure that some mistake is happening in the toplevel Makefile.* wizardy. Obviously this is not right, but on the other hand it really shouldn't matter much. Usually, this extra space doesn't matter due to another bug shown by Gerald's testcase which shows that at some invocation of a submake an intentional trailing space is gets stripped from CFLAGS. I do think I know why this bogus space causes bootstrap failures on Alpha and that is the config/mt-alphaieee which appends " -mieee" to CFLAGS, this means our wayward trailing space in CFLAGS is now longer a trailing space and so it doesn't get stripped when it is calls a submake at some point. So what does all this have to do with CPPFLAGS? Well, this bug reports exposes that we do have a more troubling problem in that CPPFLAGS is getting assigned "-O2 -g -O2". CPPFLAGS is for the preproccesor and only should have things like "-I ../dir" or "-DMACRO". This came from this patch here by Sean McNeil: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01736.html I think DJ rightfully questioned this patch at the time. It's clearly not correct to abuse CPPFLAGS that way IMO. I propose that patch be reverted. If one wants to pass something to libgfortran, use FCFLAGS (which actually may need to get added to the toplevel to pass down to libgfortran). For C++ use CXXFLAGS. That's what those two flags are for. Great, but why should that matter you ask? Because autoconf considers CPPFLAGS to be a precious (unchanging) variable, but not CFLAGS. So, reverting Sean's patch should fix both problems even with the first two bugs. Finally, I'm pretty sure that this bug is misfiled, since is a bug within our build machinery. But we don't have category for that. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |sean at mcneil dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18222