This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-19990103 c++ on Solaris2.6 needs -R/usr/local/lib


On Jan  8, 1999, Horst von Brand <vonbrand@inf.utfsm.cl> wrote:

> sparc-sun-solaris2.6: If I compile anything with c++, the resulting
> executable won't load libstdc++.so unless I explicitly give
> -R/usr/local/lib. This is not something that can be tweaked in the specs
> file, AFAIKS (not very far, I'm afraid :-).

Actually, you can add -R/usr/local/lib to the specs file, for example, 
to the `*lib:' entry.  Another option is to add $(libexecdir)/ between 
`-h' and `$(SHLIB)' in $(SHFLAGS), in libstdc++/config/sol2shm.ml.
This will hardcode the full pathname of the library into itself, so
that any program that links with it will be able to find it.  However, 
if the library is ever moved, not even LD_LIBRARY_PATH will help find
it.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]