This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -print-* command-line switches misbehave or are misdocumented
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: iant at google dot com, gcc at gcc dot gnu dot org
- Date: Sun, 05 Jul 2009 06:20:58 +0300
- Subject: Re: -print-* command-line switches misbehave or are misdocumented
- References: <83ljn62id0.fsf@gnu.org> <m3bpo0nj5f.fsf@google.com> <4A4FE6D8.8060608@gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sun, 05 Jul 2009 00:33:44 +0100
> From: Dave Korn <dave.korn.cygwin@googlemail.com>
> CC: Eli Zaretskii <eliz@gnu.org>, gcc@gcc.gnu.org
>
> >> eliz@fencepost:~$ gcc -print-prog-name=cpp
> >> cpp
> >
> > Yeah, that's a clear doc bug. It used to work with "cpp", but not with
> > current gcc releases.
> >
> >> Similarly, it doesn't work with `gcc' itself, which seems a pity,
> >> as it doesn't allow to write scripts that discover where GCC
> >> lives.
> >
> > If you are using cachecc or distcc, the question of where GCC lives is
> > somewhat ambiguous in any case.
>
> Well, the simple rule is "It can tell you where any program that gcc might
> invoke lives", isn't it? That would explain why it can locate cc1, ld and as,
> but not gcc or ls, and why it used to be able to locate cpp when it used to
> invoke cpp, but not since.
Granted, I know very well why it doesn't work with cpp and gcc. But I
was talking about _user_documentation_, and from the user's point of
view (as opposed to GCC programmer/hacker POV), the distinction is not
quite obvious. Either the docs should be fixed to make that clear, or
(better) the code should be modified to support all related programs.