This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Cross linking dynamic executables
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: Wed, 15 Dec 2004 09:41:50 -0500
- Subject: Re: Cross linking dynamic executables
- References: <41C04BD6.E752FF3E@st.com>
On Wed, Dec 15, 2004 at 02:36:06PM +0000, Andrew STUBBS wrote:
> When cross compiling a dynamic executable, the linker attempts to find
> the dynamic linker in the 'standard places' (just as it does when
> compiling nativly). This behaviour is rather irritating when the linker
> tries to link an SH object file (in my case) against the x86 dynamic
> linker on the build system.
>
> I do not know whether my solution is acceptable to other people, but I
> have attached a patch which attempts to solve the problem. It makes much
> more sense to me that the linker should look for cross dynamic linkers
> in the same place it looks for cross dynamic libraries. If it does not
> find it with the libraries it still continues to look in the standard
> places.
This is inconsistent with the rest of the rpath/rpath-link handling,
IIRC.
I recommend you try --with-sysroot, which should change where we search
for the dynamic linker.
--
Daniel Jacobowitz