From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15085 invoked by alias); 29 Jan 2004 02:00:41 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15052 invoked from network); 29 Jan 2004 02:00:38 -0000 Received: from unknown (HELO atom.ncube.com) (134.242.21.65) by sources.redhat.com with SMTP; 29 Jan 2004 02:00:38 -0000 Received: from atom.ncube.com (atom.ncube.com [127.0.0.1]) by atom.ncube.com (8.12.8/8.12.8) with ESMTP id i0T20bK5012723 for ; Wed, 28 Jan 2004 18:00:37 -0800 Received: from localhost (dlc@localhost) by atom.ncube.com (8.12.8/8.12.8/Submit) with ESMTP id i0T20a5I012719 for ; Wed, 28 Jan 2004 18:00:37 -0800 X-Authentication-Warning: atom.ncube.com: dlc owned process doing -bs Date: Thu, 29 Jan 2004 02:00:00 -0000 From: dan clark To: gdb-patches@sources.redhat.com Subject: cross compiler host vs build Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-01/txt/msg00731.txt.bz2 During the configuration of gdb for cross compilation the configure command line can include: --build, --host, --target. The configure script in 6.0 checks if the host != target to decide if a cross compiler should be used. Based on the definitions in the documentation the host is 'where gdb runs' and the target is 'where program being debugged executes', neither of which have anything to do what compiler is being used to build the code. Perhaps the decision on when to use a cross compiler should be made based on when the 'build' is not equal to the 'host' machine, thus requiring a cross compiler to produce the binary. diff -r -c -N -p -x '*.orig' -x '*.rej' gdb-6.0-orig/configure gdb-6.0/configure *** gdb-6.0-orig/configure Tue Jun 17 19:25:31 2003 --- gdb-6.0/configure Mon Dec 29 13:45:35 2003 *************** appdirs="" *** 848,854 **** # Define is_cross_compiler to save on calls to 'test'. is_cross_compiler= ! if test x"${host}" = x"${target}" ; then is_cross_compiler=no else is_cross_compiler=yes --- 848,854 ---- # Define is_cross_compiler to save on calls to 'test'. is_cross_compiler= ! if test x"${host}" = x"${build}" ; then is_cross_compiler=no else is_cross_compiler=yes -- Dan L. Clark dlc@ncube.com 503/531-6432 nCUBE, 1825 NW 167th Place, Beaverton, OR 97006