[oe] gcc-cross-initial.inc DEPENDS on libc-initial, but why conditionally on TARGET_ARCH?

Richard Purdie rpurdie at rpsys.net
Mon Mar 10 22:27:05 UTC 2008


On Mon, 2008-03-10 at 18:56 +0100, Leon Woestenberg wrote:
> On Mon, Mar 10, 2008 at 5:48 PM, Koen Kooi
> <koen at dominion.kabel.utwente.nl> wrote:
> >  | OE toolchain question: any reason why the list below includes arm*,
> >  | mips* but nothing else?
> >  |
> >  | gcc-cross-initial.inc:
> >  |
> >  "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH',
> >  | d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
> >
> >  I think that's because we only supported nptl for arm and mips when the
> >  earth was still young and glibc even nastier than today. I asked this
> >  before and never got a conclusive answer :(
> >
> I suspected this to be NPTL related, and I vaguely remember you
> explaining the initial-intermediate dependencies.
> 
> RP answered on #oe that my logic was inverse: gcc-cross-initial *does*
> depend on libc-initial *only* when arm/mips is the target, not for
> other architectures.
> 
> Indeed, when building powerpc/glibc no libc-initial is involved.
> However, when I switch to ulibc, there is a libc-initial involved, but
> it is not depended on, and a parallel build fails.
> 
> Argh, if only I understood the whole complete picture, I could fix it,

I tried asking Phil who is/was one of our glibc gurus and he said "those
two architectures are more classically 'embedded'" than, say, i386 or
powerpc and they might well have more self-hosting runtimes." but he
wasn't sure what the exact reason was.

I've become fuzzy about how the different toolchain bits fit together so
I mapped out the chains below. I've missed out references to
TARGET_PREFIX since they just confuse things:

gcc-initial depends on virtual/libc-initial for arch != (arm|mips).
glibc-initial provides this and it looks like it just stages headers
which presumably gcc-initial needs to build.

gcc-initial is the compiler used to build the libc used by gcc-cross
which is called virtual/libc-for-gcc.

virtual/libc-for-gcc is provided either by glibc or by
glibc-intermediate depending on whether we're using NPTL.

In the case NPTL isn't used, glibc depends on gcc-initial and provides
virtual/libc-for-gcc so we have:

For arm/mips:
linux-libc-headers <- gcc-initial <- glibc <- gcc-cross
For everything else:
linux-libc-headers <- glibc-initial <- gcc-initial <- glibc <- gcc-cross

When NPTL is used for arm/mips:
linux-libc-headers <- gcc-initial <- glibc-intermediate <- gcc-cross <- glibc
For everything else:
linux-libc-headers <- glibc-initial <- gcc-initial <- glibc-intermediate <- gcc-cross <- glibc

So its all a bit complex...

What was the problem you were seeing with glibc-initial?

Cheers,

Richard






More information about the Openembedded-devel mailing list