Subject: Re: libtool problem with runtime shlib path propagation
To: Nick Hudson <skrll@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-pkg
Date: 02/15/2002 10:48:35
On Fri, 15 Feb 2002, Nick Hudson wrote:

: > : ...but this bit is apparently wrong. The option to -rpath does appear in
: > : the DT_RPATH. That seem's wrong to me... just because libfoo.la 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 problem with -Wl, is that nothing gets put into the .la file which is
: what Matthias needs (I think).

Then *both* options should be specified.

-Wl, is for the library currently being created.  -rpath is for the .la
file, and thus for things which link against the library being created.
(This is right from libtool's doc.)

: This description is not strictly correct. -Wl, gets interpretted by libtool
: into the equivalent compiler and linker options. When you use a compiler to
: link it should get the compiler options and if you use a linker to link it
: should get the linker options. So, I don't believe a compiler will ever see
: -R.

-Wl, is always passed through libtool.  (Actually, if the link command is
"cc -shared", it appears to preserve the -Wl, part.)

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/