This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: gcc 3.2's cpp breaks configure scripts


On Thu, Aug 01, 2002 at 01:06:19AM +0000, Gareth Pearce wrote:
> 
> 
> >
> >> > cpp is spitting out a warning about changing the search order of 
> >include
> >> > directories, and this is breaking a _ton_ of configure scripts.  I 
> >found
> >> > this when I started rebuilding Mandrake with gcc-3.2 branch.
> >
> >Gareth Pearce writes:
> >> This, from what little i have seen, seems to be due to the fact that 
> >many
> >> configure scripts segments are extremely overly picky.  They take any 
> >output
> >> at all as to mean that its failed.  Really it should seem to me that 
> >they
> >> should be looking for errors, or specific warnings rather then just 
> >anything
> >> at all.
> >
> >Just the same, it's a lot to ask the distributors of GNU/Linux and BSD
> >systems to fix every configure script in the world.
> 
> Indeed it would be, but prehaps this should be suggested to the autoconf 
> people for future versions?
> >
> >Maybe a workaround for the time being is to have a gcc option that
> >suppresses this one warning; people can then write something like
> >
> >CC="gcc -Wno-check-include-order" ./configure ...
> >
> >to get around the problem.
> >
> >However, if this warning appears, it is likely that the programs in
> >question won't build properly on OSes that ship bad C headers, that have
> >to be fixed by fixincludes.  In that case, it may well be that the gcc
> >command lines will wind up with something like -I/usr/include which means
> >that the fixed headers will get bypassed.
> 
> Yes, would seem (to me at least) a database of where the fixincluded 
> headers came from would allow gcc to substitute them back in when you pass 
> a -I like that. (I dont see any significant performance issue, is there 
> possibility that people Really want to overide the fixincludes? - in which 
> case there could be a -fallow-fixincludes-overide?).
> (Also, last time i checked gcc produces that warning for Any directories 
> which are considered internal, rather than Just the direectories where the 
> fixincluded headers came from! - I compile gcc with --prefix=$HOME on my 
> OSF alpha box since i dont have priviledges for /usr or /usr/local - and 
> even though, all the headers in my home directory are entirely from 
> application install, $HOME/include was the biggest cause of warnings i 
> experienced. - I havent compiled much with my latest gcc cvs version yet so 
> maybe that has changed.)
> 
> Idealy in my mind - autoconf would make configure scripts that Warn users 
> if such warnings turned up, but ignore them otherwise.
> 
> However, I am a humble user, my opinions are from a very limited sphere of 
> use.

-I/usr/include is actually a very substantial problem.  For instance,
when cross-compiling, it tends to make target programs pick up the
build system's headers.  I don't think GCC should do anything to work
around this warning.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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