This is the mail archive of the gcc@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: Shared library runpath trouble in Solaris.


On 11 Nov 1997, Alexandre Oliva wrote:

> So g++ should invoke the linker like this:
> 
> ld -R/path/to/libstdc++ -R/usr/lib -R/whatever/-R/flags/issued/by/the/user

But it should only do this, when LD_RUN_PATH is not set, since
unfortunately -R cancels the settings from LD_RUN_PATH. So when
LD_RUN_PATH is set (and -R is not present) /path/to/libstdc++ should be
added to LD_RUN_PATH. 

I think it should be the default. When I installed the shared libg++, I
got a lot of complaints from our users asking why their programs did no
longer run. The tenor was, that for getting an executable it should be
sufficient to say "c++ -o program part1.cc part2.cc ... partx.cc" like god
has it intended to be :-), without the requirement for funny options
nobody ever heard of. Eventually I made a little shellscript and called it
g++, which adds /usr/local/gnu/lib to LD_RUN_PATH if it is set or else
adds -R /usr/local/gnu/lib and then calls g++.real. But it would be great
when g++ could handle it per default (and perhaps configurable via
specs...)

Just my 2 cents

--Swen




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