This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
rpath semantics in binutils?
- To: egcs at cygnus dot com
- Subject: rpath semantics in binutils?
- From: Todd Vierling <tv at pobox dot com>
- Date: Thu, 29 Jan 1998 20:19:53 -0500 (EST)
Not that this is directly related to egcs, but upon building and using a
cross compiler for SunOS 4.1.x SPARC, I found that GNU ld does the following
(rather odd, in my opinion) things with -L and -rpath for SunOS (sunos.em).
- If -rpath is specified on the command line, no directories specified by
-L are searched for shared libraries. (They then have to be specified
with -rpath-link.)
- The binary's rpath (list of runtime shared library search paths) is built
from internal library paths (unless -nostdlib) and all -L options. This
is more than bogus for a cross-compiler, and IMHO, rpath should only be
created if one is explicitly specified on the command line.
My experience is that, using egcs/gcc and gld, a binary winds up with an
rpath set to the usual ld paths _plus_ the cross-compiler lib paths and all
relative -L paths on the gcc command line. That's rather broken.
I have a quick patch to "fix" these vs. binutils 2.8.1--the -L options are
_always_ searched for shared libraries (though it kinda makes -rpath-link
moot), and the rpath defaults to empty and is not built from -L options (it
is built only from an explicit set of -rpath options). This "fixed"
behavior appears to be the default for ELF platforms, but I'm not currently
positive.
=====
===== Todd Vierling (Personal tv@pobox.com) =====
== "There's a myth that there is a scarcity of justice to go around, so
== that if we extend justice to 'those people,' it will somehow erode the
== quality of justice everyone else receives." -- Maria Price