From: dan clark <dlc@ncube.com>
To: Felix Lee <felix.1@canids.net>
Cc: gdb-patches@sources.redhat.com
Subject: with-headers should be 'build' != 'host'
Date: Thu, 29 Jan 2004 17:00:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0401290822280.13269-200000@atom.ncube.com> (raw)
In-Reply-To: <20040129034507.D5314180D@grayscale.canids>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1943 bytes --]
Thank you for the clarification. I agree that a fix should be
applied to configure.in. Since the tar file includes both
configure and configure.in the configure script must also be patched in
attempts to use the 6.0 distribution as provided.
The use of is_cross_compiler does seem to be overloaded. In particular,
it is subsequently used for determining the skipdirs, determining if
newlib should be built, and if it is OK to have the 'with_headers' value
defined, the later of which is most problematic. If the 'build' != 'host'
then it is likely that 'with_headers' will be defined. But it may very
well be that 'host' == 'target' in this case. The fix I proposed is a bit
heavy handed, perhaps the more appropriate way of dealing with this
issue is the refine the test which results in the error:
"*** --with-headers is only supported when cross compiling"
The resulting revised patch is attached for clarity.
dan
On Wed, 28 Jan 2004, Felix Lee wrote:
> dan clark <dlc@ncube.com>:
> > The configure script in 6.0 checks if the host != target to decide if a
> > cross compiler should be used.
>
> no, it doesn't. is_cross_compiler is a badly named variable. it
> means you're building a cross development gdb, and it doesn't
> have anything to do with whether you're using a cross compiler to
> build gdb. (the variable name makes more sense when you have an
> integrated gdb/gcc source tree.)
>
> there are different tests elsewhere for build != host.
>
> (note, configure is a file generated by autoconf. patches should
> be made to configure.in.)
>
> I don't really see a reason for the variable is_cross_compiler
> to exist. the comment says
> # Define is_cross_compiler to save on calls to 'test'.
> but it's usually used like this
> if test x${is_cross_compiler} != xno ; then
> so it's not reducing the number of tests much. I think directly
> testing host = target would be clearer.
> --
>
>
[-- Attachment #2: diff --]
[-- Type: TEXT/PLAIN, Size: 1612 bytes --]
*** configure Thu Jan 29 08:55:35 2004
--- configure.orig Thu Jan 29 08:56:01 2004
*************** copy_dirs=
*** 1603,1609 ****
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x ; then
! if test x"${host}" = x"${build}"; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
fi
--- 1603,1609 ----
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x ; then
! if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
fi
*** configure.in Thu Jan 29 08:57:13 2004
--- configure.in.orig Thu Jan 29 08:56:55 2004
*************** copy_dirs=
*** 917,923 ****
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x ; then
! if test x"${host}" = x"${build}"; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
fi
--- 917,923 ----
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x ; then
! if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
fi
next prev parent reply other threads:[~2004-01-29 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-29 2:00 cross compiler host vs build dan clark
2004-01-29 3:45 ` Felix Lee
2004-01-29 17:00 ` dan clark [this message]
2004-01-29 18:12 ` with-headers should be 'build' != 'host' 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.0401290822280.13269-200000@atom.ncube.com \
--to=dlc@ncube.com \
--cc=felix.1@canids.net \
--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