Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dan clark <dlc@ncube.com>
To: gdb-patches@sources.redhat.com
Subject: cross compiler host vs build
Date: Thu, 29 Jan 2004 02:00:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0401281659260.12228-100000@atom.ncube.com> (raw)

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


             reply	other threads:[~2004-01-29  2:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-29  2:00 dan clark [this message]
2004-01-29  3:45 ` Felix Lee
2004-01-29 17:00   ` with-headers should be 'build' != 'host' dan clark
2004-01-29 18:12     ` Daniel Jacobowitz
2004-01-29 21:41       ` Ian Lance Taylor
2004-01-29 22:25         ` Felix Lee
2004-01-29 18:41     ` Felix Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0401281659260.12228-100000@atom.ncube.com \
    --to=dlc@ncube.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox