Ian Lance Taylor wrote: > Eli Zaretskii <eliz@ writes: >> 3. -print-prog-name: Works only for some programs; manual text >> misleading. >> >> The manual says: >> >> `-print-prog-name=PROGRAM' >> Like `-print-file-name', but searches for a program such as `cpp'. >> >> It fails to say what programs will this work with. The example it >> gives, `cpp' doesn't work: >> >> e...@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. cheers, DaveK