Subject: Re: libtool problem with runtime shlib path propagation
To: Nick Hudson <>
From: Todd Vierling <>
List: tech-toolchain
Date: 02/15/2002 10:26:16
On Fri, 15 Feb 2002, Nick Hudson wrote:

: > > When using libtool, the correct option is "-rpath".  -Wl,-R should only be
: > > used by non-libtoolized packages.  libtool converts "-rpath" to the linker
: > > options detected by libtool's configure step.
: >
: > I don't think this is the required option here.
: >
: > -rpath is used by libtool to denote the install location of a library. If a
: > library is linked (using libtool) against the resulting file then
: > this "install" directory will appear in the DT_RPATH of this new library.
: This bit is right.
: > The option to libtool's -rpath will not appear in the DT_RPATH of the
: > resulting library.
: ...but this bit is apparently wrong. The option to -rpath does appear in the
: DT_RPATH. That seem's wrong to me... just because gets installed
: into a directory doesn't mean any of it dependencies are there.

Yah, I see what you mean now.  Looking at libtool's doc, I'm going to do a
180 here and say that the appropriate flag *is* -Wl,-R${X11BASE}....

The reason I say this is that "-Wl," is interpreted by libtool itself, and
reduced to -R.  For platforms on which "cc -shared" is appropriate, "cc"
will accept "-R" as an argument.  For platforms where the linker is "ld
-Bshareable", the -R option will be passed to "ld" directly, so it's still

-- Todd Vierling <>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --