This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Relative DT_RPATH/DT_RUNPATH vs. sysroot capable ld.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 24 Sep 2015 14:04:13 -0400 (EDT)
- Subject: Re: Relative DT_RPATH/DT_RUNPATH vs. sysroot capable ld.
- Authentication-results: sourceware.org; auth=none
- References: <20150924133754 dot GA12440 at bubble dot grove dot modra dot org>
On Thu, 24 Sep 2015, Alan Modra wrote:
> This fixes two problems. First, the --sysroot option wasn't available
> with a ld configured without --with-sysroot, a historical accident.
> This led to people configuring binutils with --with-sysroot=/ in order
> to enable sysroot support, which exposes a case where ld wrongly
> prepends the sysroot to a relative path.
>
> PR ld/18992
> * ldmain.c (main): Always enable --sysroot.
> * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
> prepend sysroot to relative rpath/runpath.
I though this would break some case in
testsuite/ld-scripts/sysroot-prefix.exp but apparently not.
(I re-checked with --with-sysroot=/tmp/somewherenotfound
toolchains.)
Still, it could do with some adjustment: parts of the table can
be folded now that there's no "non-sysroot" (it's now the same
as sysroot == "/" IIUC).
brgds, H-P