This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: What is the search path for gcc sub-programs?
- From: Ian Lance Taylor <iant at google dot com>
- To: ali hagigat <hagigatali at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 24 May 2011 07:28:05 -0700
- Subject: Re: What is the search path for gcc sub-programs?
- References: <BANLkTinnu06bXO+OL8ddfF=1RQjvCaa+Ug@mail.gmail.com>
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