From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21049 invoked by alias); 13 Jun 2005 15:30:17 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21031 invoked by uid 22791); 13 Jun 2005 15:30:13 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 13 Jun 2005 15:30:13 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1Dhqt6-0001qx-6I; Mon, 13 Jun 2005 11:30:08 -0400 Date: Mon, 13 Jun 2005 15:30:00 -0000 From: Daniel Jacobowitz To: Aaron Gaudio Cc: gdb Subject: Re: Configuring linker flags while cross-compiling gdb Message-ID: <20050613153007.GA7054@nevyn.them.org> Mail-Followup-To: Aaron Gaudio , gdb References: <1118676366.27729.73.camel@rockhopper> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1118676366.27729.73.camel@rockhopper> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-06/txt/msg00113.txt.bz2 On Mon, Jun 13, 2005 at 11:26:06AM -0400, Aaron Gaudio wrote: > Continuing with my adventure from last week, I am now trying to cross- > comile gdb to run on i386-pc-solaris2.10 and build on sparc-sun- > solaris2.10. > > I used the following configure line: > > $ bash_cv_have_mbstate_t=yes ./configure --build sparc-sun-solaris2.8 -- > host i386-pc-solaris2.10 > > This seems to get the correct compilers to use. However, when trying to > link, it is missing the correct rpath-link (where I have the x86 sysroot > to link system libraries), and it is also not linking in a required > library, libsocket (I get undefined symbols that manually adding - > lsocket to the link command fixes). These both sound like problems with your cross compiler, not problems with GDB. > So, now I'm trying to figure out if there is a way to pass these by way > of option or environment variable to the top-level configure in a way > that they will cascade to the subdirectory configures and/or Makefiles. > Perusing the scripts in question, the top-level configure and > Makefile.in use a variable called "LDFLAGS_FOR_TARGET", and that seems > like the place to add a -R option or -W,l,--rpath-link to take care of > the rpath, however the gdb/configure and gdb/Makefile.in don't reference > this variable at all... No, that's for target libraries. Gdb is a host program. The fact taht build != host is irrelevant here; your "target" is i386-pc-solaris2.10, and so is your "host". LDFLAGS is the correct place to add flags for the host. -- Daniel Jacobowitz CodeSourcery, LLC