V3 PATCH: Use -rpath, not --rpath, when testing

Alexandre Oliva aoliva@redhat.com
Sun Oct 29 19:31:00 GMT 2000

On Oct 30, 2000, Mark Mitchell <mark@codesourcery.com> wrote:

> We're building and linking a program, and it involves shared
> libraries, and libtool is supposed to be good for that, right?


> Something like:

>   libtool -mode=link [-all-static] -rpath $LIB_PATH ...

> I thought libtool by magic changes the -rpath into whatever is
> appropriate for the target.  Isn't that right?

That's right.  But -rpath is supposed to be listed *after* the
compiler name.  Ditto for -all-static, but I wouldn't recommend using
it; on too many platforms, it causes linker errors because libc or
some other relevant library is only available in shared form.  -static
is more advisable, but even that isn't needed.

As long as you link with libtool libraries, you shouldn't even need
-rpath; libtool will figure out the right `-rpath' flags by itself.

Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

More information about the Gcc-patches mailing list