This is the mail archive of the
mailing list for the binutils project.
Re: Honoring DT_RUNPATH in cross-ld
- From: ludo at gnu dot org (Ludovic CourtÃs)
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 29 May 2013 23:35:41 +0200
- Subject: Re: Honoring DT_RUNPATH in cross-ld
- References: <87txlmali7 dot fsf at gnu dot org> <CAKOQZ8zYFr61g+TeWfTcbrOkGX5pRMzZfes0nSjfPLWNrxG=+A at mail dot gmail dot com>
Ian Lance Taylor <firstname.lastname@example.org> skribis:
> On Tue, May 28, 2013 at 1:37 PM, Ludovic CourtÃs <email@example.com> wrote:
>> By default, cross ld does not honor DT_RPATH/DT_RUNPATH entries when
>> searching for a NEEDed shared library.
>> This behavior can be changed by configuring --with-sysroot, because
>> genscripts.sh sets USE_LIBPATH=yes as a side effect, which in turn
>> enables RUNPATH search in elf32.em.
>> Sometimes this lookup rule is needed even though the system has nothing
>> like a sysroot (this is the case with GNU Guix, which installs each
>> package in its own directory, Ã la Stow.)
>> What about providing a separate configure option specifically for this?
> DT_RPATH and DT_RUNPATH are absolute paths. Your suggestion only
> makes sense if the shared libraries are found at the same absolute
> path on both the host system and the target system. That seems to me
> to be unlikely.
This scenario is what happens when cross-compiling with GNU Guix or Nix,
which use unique directory names for build results.
Perhaps itâs an infrequent situation apart from these two cases.
> In any case you can presumably do what you want by using --with-sysroot=/.
Yes; however, the connection between the option name and the desired
effect is non-trivial.