3.14 Options for Directory Search -Bprefix ---------------------- Please take a look at gcc manual and the search algorithm for gcc sub-programs. I am using gcc 4.4.4, Fedora 12. When i use: > gcc -v prog1.c -o prog1 COMPILER_PATH=/usr/libexec/gcc/i686-redhat-linux/4.4.4/:/usr/libexec/gcc/i686-redhat-linux/4.4.4/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/:/usr/libexec/gcc/i686-redhat-linux/4.4.4/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-o' 'prog1' '-mtune=generic' '-march=i686' /usr/libexec/gcc/i686-redhat-linux/4.4.4/collect2 --eh-frame-hdr --build-id -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -o prog1 /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../crti.o /usr/lib/gcc/i686-redhat-linux/4.4.4/crtbegin.o -L/usr/lib/gcc/i686-redhat-linux/4.4.4 -L/usr/lib/gcc/i686-redhat-linux/4.4.4 -L/usr/lib/gcc/i686-redhat-linux/4.4.4/../../.. /tmp/ccgl0BnU.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/4.4.4/crtend.o /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../crtn.o 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" !!