This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RESEND][PATCH] ld: -rpath must search under sysroot
- From: Alan Modra <amodra at gmail dot com>
- To: Andy Ross <andy dot ross at windriver dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, binutils at sourceware dot org
- Date: Mon, 22 Oct 2012 15:59:59 +1030
- Subject: Re: [RESEND][PATCH] ld: -rpath must search under sysroot
- References: <1346949467-6565-1-git-send-email-andy.ross@windriver.com> <Pine.LNX.4.64.1209072127570.16279@digraph.polyomino.org.uk> <5050D280.7030304@windriver.com>
On Wed, Sep 12, 2012 at 11:20:48AM -0700, Andy Ross wrote:
> The -rpath argument would search the host filesystem for libraries,
> even when a sysroot was defined. For cross toolchains with targets
> compatible with the host architecture this can find incorrect
> libraries. Leave -rpath-link unmodified, as build systems in the wild
> are already using this to point to host directories.
I agree that your patch makes sense, but I hesitate to apply the
change for two reasons:
a) It's odd to have -rpath add the sysroot but -rpath-link not do so.
b) I wonder how many people already add the sysroot to their -rpath
argument, and would have their builds broken by this change.
--
Alan Modra
Australia Development Lab, IBM