Hi,
This is my first post to the list and I will admit upfront that I am not an expert on gcc in any way. So if you see faulty reasoning on my part, feel free to point that out.
I have run into a problem with libtool and gcc (on Solaris). Libtool is querying gcc for locations to certain shared library files, such as 'libstdc++.so.5' and does so by asking gcc with the '-print-file-name' option. For me, gcc replies;
$ gcc -print-file-name=libstdc++.so.5 /opt/lang/gcc-3.3.2/lib/gcc-lib/i386-pc-solaris2.8/3.3.2/../../../libstdc++.so.5
And then proceeds to link in, directly, that full path. Resulting in a binary which will not look in any other dir for 'libstdc++.so.5', regardless what I set my -R linker options to.
Per the manual, it seems that gcc, absent a -B option, searches '/usr/lib/gcc', then '/usr/local/lib/gcc-lib' and finally asks my shell where 'gcc' may be invoked and assembles the path name from there.
Is there a way I can instruct gcc to search a custom path for 'libstdc++.so.5' with the specs file or anything like that? My goal is to relocate the stub libraries to more convenient places (of my choosing), without having to use a -B option. Specifically in such a way that gcc reports the path to this library with the '-print-file-name' so that libtool may operate the way it wants to.
Thanks in advance!
-Alex