From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7162 invoked by alias); 3 Oct 2006 22:39:59 -0000 Received: (qmail 7154 invoked by uid 22791); 3 Oct 2006 22:39:58 -0000 X-Spam-Check-By: sourceware.org Received: from mail.zeugmasystems.com (HELO zeugmasystems.com) (192.139.122.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Oct 2006 22:39:56 +0000 Content-class: urn:content-classes:message Subject: How to coerce gdb into pseudo-cross-compiling when build == host? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 03 Oct 2006 22:39:00 -0000 Message-ID: <66910A579C9312469A7DF9ADB54A8B7D3E6E61@exchange.ZeugmaSystems.local> From: "Kaz Kylheku" To: 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/msg00013.txt.bz2 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=3Di686-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.