[Bug preprocessor/12829] include search bug -- gid related

evh at ehynan dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 9 13:03:00 GMT 2003


------- Additional Comments From evh at ehynan dot com  2003-12-09 13:03 -------
(In reply to comment #7)
> I cannot reproduce it on 3.2.3 or the mainline.

Sh*t.  I just found that my sg command removes a few environment
variables: $HOME, $MAIL, $OLDPWD, $PATH.  (BTW, this is not documented
in my sg manpage.)  So, the shell uses the default PATH for its searches,
but its children don't inherit PATH in their environment.  Apparently gcc
wants to use $PATH, and without it will generate a cc1 command with
`-iprefix ../[whatever]'.  The relative path argument to -iprefix is a
bad guess, but this is clearly _not_ an egid problem as I had thought.
Sorry I didn't spot this before, but I never would have guessed that sg
would remove PATH.

If you couldn't reproduce this, maybe your sg behaves differently.  If
you're still interested in this (doubtful), try
% sg whatever -c printenv | egrep '\<PATH\>'
and if you _do_ have PATH, than try again with PATH unset.  It might not
be worth your time now, but I am curious.  The question remains why gcc
would generate the bad cc1 command if PATH is unset.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12829



More information about the Gcc-bugs mailing list