From: Detlef Vollmann <dv@vollmann.ch>
To: openembedded-devel@openembedded.org
Subject: Re: cross and staging directories
Date: Mon, 24 Sep 2007 08:38:28 +0200 [thread overview]
Message-ID: <46F75B64.1C3AE60B@vollmann.ch> (raw)
In-Reply-To: 1190191062.7630.17.camel@localhost.localdomain
Hello,
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
> STAGING_INCDIR.
>
> 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 ... \
/path-to-cross/bin/../lib/gcc/powerpc-angstrom-linux/4.1.1/crtend.o \
/path-to-cross/bin/../lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib/crtn.o
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
'path-to-cross/lib/gcc/powerpc-angstrom-linux/4.1.1'
while crti.o is taken from
'path-to-cross/powerpc-angstrom-linux/lib'
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
--
Detlef Vollmann vollmann engineering gmbh
Linux and C++ for Embedded Systems http://www.vollmann.ch/
next prev parent reply other threads:[~2007-09-24 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 8:37 cross and staging directories Richard Purdie
2007-09-19 14:39 ` Richard Purdie
2007-09-24 6:38 ` Detlef Vollmann [this message]
2007-09-24 8:51 ` Richard Purdie
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=46F75B64.1C3AE60B@vollmann.ch \
--to=dv@vollmann.ch \
--cc=openembedded-devel@lists.openembedded.org \
--cc=openembedded-devel@openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.