Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: sharesrc
Charles M. Hannum <root%ihack.net@localhost> wrote:
>Matthew Green <mrg%eterna.com.au@localhost> wrote:
>> it seems to be that this is wrong. we do *not* want to write
>> $DESTDIR/usr/lib
>> as the runtime path into each binary.. i want my install binaries to use the
>> normal, standard, path, not some random, ah-hoc directory, that i decided to
>> use as my $DESTDIR for this build.
>
>That's nice, but unfortunately ld(1) uses the rpath to find dependent
>libraries during the link. Without that change, cross-compiling many
>executables was not possible.
>
>I'd certainly prefer some other way of solving the problem.
Would the -rpath-link option work? We've been having a bit of a discussion
over in current-users about -L and -rpath stuff, and I noticed it while
browsing through the gnu ld man page. It looks like it might be what you
need:
-rpath-link directory
When using ELF or SunOS, one shared library may re-
quire another. This happens when an ld -shared
link includes a shared library as one of the input
files.
When the linker encounters such a dependency when
doing a non-shared, non-relocateable link, it will
automatically try to locate the required shared li-
brary and include it in the link, if it is not in-
cluded explicitly. In such a case, the -rpath-link
option specifies the first set of directories to
search. The -rpath-link option may specify a se-
quence of directory names either by specifying a
list of names separated by colons, or by appearing
multiple times.
If the required shared library is not found, the
linker will issue a warning and continue with the
link.
(Unfortunately, the DNS troubles have made it hard to follow anything
on the mailing lists recently...)
jdarrow
--
John Darrow - Senior Technical Specialist Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187 Fax: 630/752-5968
Alphapage: 6303160707%alphapage.airtouch.com@localhost Pager:
630/316-0707
Email: John.P.Darrow%wheaton.edu@localhost
Home |
Main Index |
Thread Index |
Old Index