Cross linking dynamic executables

Daniel Jacobowitz drow@false.org
Wed Dec 15 14:42:00 GMT 2004


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



More information about the Binutils mailing list