From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15119 invoked by alias); 15 Dec 2004 14:42:16 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 14924 invoked from network); 15 Dec 2004 14:42:03 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 15 Dec 2004 14:42:03 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CeaLe-0003US-CY; Wed, 15 Dec 2004 09:41:50 -0500 Date: Wed, 15 Dec 2004 14:42:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: binutils Subject: Re: Cross linking dynamic executables Message-ID: <20041215144149.GA13362@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , binutils References: <41C04BD6.E752FF3E@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41C04BD6.E752FF3E@st.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00167.txt.bz2 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