sumit.jain@xxxxxxxxx writes: > > I have some query regarding the way gcc resolves the search directory > for standard libraries like libc. When I run command "gcc -v test.c" i > get the following output > As the last section of the output illustrated that the location that the > linker looks for libraries like libc etc is > "-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2" and > "-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.." > Is there anyway i can change the default search location. > > I believe that by passing my own spec file to gcc as gcc > -specs=<myspecs> test.c, i can change the default include path and also > the path to look for for crt0.o etc. OK, so you believe this. So what happened when you tried it? IMO, that's the wrong way to do it. If you *really* need to use nonstandard paths we provide args like -Isystem and -nostdlib. But generally gcc is configured for a particular target environment and things will go wrong if you try to change things under its feet. If the libraries and include paths are very similar, you might get way with it. Andrew.