This is the mail archive of the gcc-bugs@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: New cpp0 warning in 3.1 breaks configure (autoconf)


On Tue, Jun 11, 2002 at 04:44:02PM -0500, Loren James Rittle wrote:
> >> Why is it on by default?
> >
> > Nobody knows.
> 
> Now Phil, as you know, the reasons for this warning were discussed at
> length on the various gcc lists...

You're quite right; my frustration was showing.


> From our current info page, here is the exact reason to avoid
> -I/usr/include:

/usr/include is probably the only case that I would warn about.  Warning
about the other directory names built from $prefix just seems to be
causing problems.

What just killed the idea for me was when I installed multiple copies of
GCC for my users, and the simple presence of symbolic links -- surely not
an unreasonble thing for multiple installations of a package -- confused
this checker.  Doing

    % echo 'int x;' > foo.c
    % gcc -c foo.c

and getting warnings that 1) the user can't turn off, and 2) the user
doesn't understand, didn't really improve my opinion of the check.

Maybe making the check less ambitious? less aware of paths? or something like
that would work.  Warning about -I/usr/include is good, but if we're going to
warn about more, the users need to be able to at least turn the warnings off.


> >> How are one supposed to workaround this in configure scripts?
> 
> Well, one does need to understand in detail why configure is checking
> ``gcc -I/usr/include'' instead of just ``gcc'' to make any proper
> change.  Does this really affect every autoconf'd package (on at least
> some platforms with at least some version of autoconf, hopefully an
> older one)?  I have never seen this problem with autoconf stuff.  Or,
> it is related to a local setting of CC or CFLAGS, etc?

I /think/ I've seen this before, from very old versions of autoconf...?


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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