[PATCH] Enable download and build of expat when cross-static gdb is requested
Yann E. MORIN
yann.morin.1998@free.fr
Mon Jun 17 21:48:00 GMT 2013
Daniel, Bryan, All,
On 2013-06-06 22:16 -0700, Daniel Price spake thusly:
> On Thu, Jun 6, 2013 at 6:58 PM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> ...
> >
> > (See note after the next note)
> >
> >>+ do_gdb_expat_backend host="" \
> >
> > Shouldn't host="${CT_TARGET}" ?
This is expat for cross-gdb, not native gdb. So it's not CT_TARGET, but
CT_HOST.
> I set it to "" so that we'd build expat for the system we're building on...
Since we're talking about expat for the cross-gdb, this is wrong. The
toolchain may run on a system different from the system it was built on.
Think canadian builds, for example, where:
- toolchain is built on system A (eg. an x86)
- toolchian runs on system B (eg. an PowerPC)
- toolchain generates code for system C (eg. an ARM)
In this case, you don't want to build expat for system A, but for
system B.
<rant>
Sliding a bit on this topic, we could consider a canadian build to be
the norm for a toolchain, and all other cases to be denormalised cases;
for example, a cross-toolchain is just a canadian toolchain where
build == host; a cross-native another special case where host == target;
and a native where build == host == target.
The fact that a canadian is more complex is just because it is not
common (nowadays at least, it used to be more common long ago), and that
native is the norm, cross is a slightly denormalised native, cross-
native a relatively rare event, and canadian an exceptionally rare
occurence.
Life is life, we have to live it. ;-)
</rant>
> >>+ prefix="${CT_BUILD_DIR}/static-cross" \
> >
> > Since this build of expat is the same build as what is built for the
> > native gdb, we should save some time and set the prefix to
> > "${CT_BUILD_DIR}/static-target" and pushd to
> > "${CT_BUILD_DIR}/build-ncurses-target-${CT_TARGET}".
> > Then during native, in the same code section, before building expat, we
> > could just check to see if it exists there and skip or build if it isn't.
> > Just an idea ;) (cross-gdb builds before native-gdb, if you are building
> > both)
>
> Hi Bryan, thanks for the response--
>
> Hmm. Now I'm worried that I don't understand the problem I set out to
> solve :) I thought that "native gdb" meant "a gdb cross-compiled to
> run on the target."
Right.
> Whereas I thought that cross-gdb meant "a gdb
> compiled to run on this host, targetted at a remote target."
Mostly. It's not "this host" but simply "the host" (see above, canadian
builds).
> So for
> the first, we need a cross-compiled expat,
Right, and we already have it.
> and for the second we need
> one which is compiled for the (for lack of a better term) "host"
> system.
Right.
> I'm confused as to why we could reuse the same build of
> expat? Maybe I've missed something major here. Thanks again,
I think you got it right in your explanations. But since you missed the
canadian build case, you missed that build != host in some cases.
Regards,
Yann E. MORIN.
PS. Sorry for the delay in anserwing these days, I've a hard time
finding enough time to handle real life, then do some computer-related
things afterwards... :-/
YEM.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list