What is the search path for gcc sub-programs?
Ian Lance Taylor
iant@google.com
Wed May 25 00:39:00 GMT 2011
ali hagigat <hagigatali@gmail.com> writes:
> According to the manual, search first looks at -B and then two
> directories, ‘/usr/lib/gcc/’ and ‘/usr/local/lib/gcc/’ and then PATH
> environment variable.
>
> But why "collect2" is found in
> /usr/libexec/gcc/i686-redhat-linux/4.4.4/? There is no such path in my
> PATH environment variable. Besides it seems that the compiler driver
> is searching "collect2" by COMPILER_PATH symbol. The same path is used
> for "cc1" but not for "as" !!
The compiler uses additional paths to find internal compiler programs
like cc1 and collect2. As far as I know these additional paths are not
documented, and they may change in the future. The -B option works as
documented.
Ian
More information about the Gcc-help
mailing list