This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
cross compiler host vs build
- From: dan clark <dlc at ncube dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 28 Jan 2004 18:00:36 -0800 (PST)
- Subject: cross compiler host vs build
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