This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LD_LIBRARY_PATH
On Tue, Nov 26, 2002 at 12:51:18AM +1100, Fergus Henderson wrote:
> On 24-Nov-2002, Albert Chin <gcc@lists.thewrittenword.com> wrote:
> > On Sat, Nov 23, 2002 at 11:12:03AM -0800, Jason R Thorpe wrote:
> > > On Sat, Nov 23, 2002 at 07:50:21PM +0100, Gerald Pfeifer wrote:
> > >
> > > > This is an issue coming up again and again, and it really seems to
> > > > burn users, especially since we switched to libgcc_s.so.
> > >
> > > ...and it will continue to come up again and again so long as the GCC
> > > driver does not record an rpath to the GCC-distributed shared libraries
> > > by passing an -R for every -L passed to the linker (lossage is especially
> > > colorful for people who have multiple versions of the compiler installed :-).
> > >
> > > I'm still puzzled as to why that idea is shot down every time it is
> > > suggested...
> >
> > This cannot be done for every platform. HP-UX, Tru64 UNIX, and AIX
> > don't treat multiple -R arguments additively like IRIX, Solaris, and
> > Linux.
>
> For Tru64, you just need to bunch the -R arguments together into a
> single such argument, using ":" as the path separator. The Mercury
> linker does this on Tru64, converting multiple -R options passed to the
> Mercury linker into a single -rpath option to pass to Tru64 linker.
>
> Are HP-UX or AIX any more difficult?
They are the same. Unfortunately, for AIX, you have to remember to add
/lib as it is not searched implicitly. Our solution has been to wrap
/bin/ld on these platforms to accomplish the above:
http://freshmeat.net/projects/wrapld/?topic_id=46
--
albert chin (china@thewrittenword.com)