From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11580 invoked by alias); 3 Oct 2006 22:57:22 -0000 Received: (qmail 11572 invoked by uid 22791); 3 Oct 2006 22:57:21 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Oct 2006 22:57:18 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 7DFFCC4BE6; Tue, 3 Oct 2006 18:57:15 -0400 (EDT) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Tue, 3 Oct 2006 18:57:15 -0400 (EDT) Received: from [192.168.7.26] ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 3 Oct 2006 15:57:14 -0700 Message-ID: <4522EACA.2090006@avtrex.com> Date: Tue, 03 Oct 2006 22:57:00 -0000 From: David Daney User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) MIME-Version: 1.0 To: Kaz Kylheku Cc: gdb@sourceware.org Subject: Re: How to coerce gdb into pseudo-cross-compiling when build == host? References: <66910A579C9312469A7DF9ADB54A8B7D3E6E61@exchange.ZeugmaSystems.local> In-Reply-To: <66910A579C9312469A7DF9ADB54A8B7D3E6E61@exchange.ZeugmaSystems.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00014.txt.bz2 Kaz Kylheku wrote: > I'm building a Linux system from scratch. Everything builds for MIPS and > i686 using the same script, except for gdb. > > The problem is that it thinks it's not being cross-compiled and starts > using plain "gcc" for compiling and linking, which brings in the build > system's local header files and libraries. > > I want it to use the toolchain that my script built for it, which will > use the header files that I installed into the target filesystem tree, > and the libraries that the script built earlier: glibc, ncurses, etc. > > I fooled gcc's configure into using "i686-linux-gcc" by lying to it > using --build=i686-bsd. > > Everything worked. > > But what's the a better way to do this, without lying about the OS? > > Basically, the --build is totally irrelevant. It seem that I could put > in some nonsense like "mk68-solaris" and it would still work. Anything > /but/ the actual architecture and OS that I'm actually building on. 'path_to_gdb/configure --build=i686-pc-linux-gnu --target=mipsel-linux --host=mipsel-linux' does not work for you? I (sucessfully) cross build gdb with that exact configure command. I should also note that I have never had to lie to configure in the manner you suggest for gcc either. The configure system for gdb, binutils and gcc works well for cross building in all the cases I have tried. David Daney