[oe] cross and staging directories
dv at vollmann.ch
Mon Sep 24 08:38:28 CEST 2007
Richard Purdie wrote:
> I've been experimenting a bit in Poky to find out exactly why we need
> the cross directory.
> The motivation for this is the load of files we duplicate in both,
> particularly linux-libc-headers, headers from glibc-initial, glibc and
> glibc-intermediate and libs from glibc and glibc-intermediate.
So your idea is to omit the cross directory and install the
cross compiler inside staging?
Or to keep the cross compiler in cross, but install the libraries
in staging only?
> Just not staging the files to cross gives some interesting errors.
> Whenever anything tries to link to glibc, you see errors about not being
> able to find crti.o and friends. The files are in STAGING_LIBDIR, gcc
> just refuses to see them. Poky also demonstrated you also occasionally
> see errors about missing header files despite the header files being in
> Why does this happen?
Some files are linked in directly from fix places relative to the
gcc binary. So if gcc is in cross and you call it with
'/path-to-cross/bin/powerpc-angstrom-linux-gcc -v hello.c'
you'll see something like
/path-to-cross/bin/../libexec/gcc/powerpc-angstrom-linux/4.1.1/collect2 ... \
If you move the compiler somewhere else, only 'path-to-cross' changes,
but the rest keeps the same.
So, files like crtsavres.o and crtend.o are taken from
while crti.o is taken from
So, if you install the cross-gcc into staging/bin, everything is fine.
But if you install the cross-gcc into staging/i686-linux/bin,
crti.o isn't found anymore.
Just some more thoughts,
Detlef Vollmann vollmann engineering gmbh
Linux and C++ for Embedded Systems http://www.vollmann.ch/
More information about the Openembedded-devel