All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: openembedded-devel@openembedded.org
Subject: Re: cross and staging directories
Date: Mon, 24 Sep 2007 09:51:02 +0100	[thread overview]
Message-ID: <1190623862.6176.20.camel@localhost.localdomain> (raw)
In-Reply-To: <46F75B64.1C3AE60B@vollmann.ch>

Hi,

On Mon, 2007-09-24 at 08:38 +0200, Detlef Vollmann wrote:
> 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?

Initially, I want to leave the compiler in cross but install libraries
and headers into staging only which is what the patch did.

Whether we can improve things further than that remains to be seen - one
step at a time :).

> 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.

I understand that. For now I've worked around this by symlinking cross
to staging which to me is neater than having two copies of all these
libs/headers installed (and makes the builds faster and more space
efficient).

In the future I'd prefer to see the symlink removed and the staging
inc/lib paths added into the compiler's default search paths in some
other way. The most promising looking approach for this is to use the
sysroot support since that passes from the compiler to the linker and
binutils and would "just work".

I think this step makes sense regardless of whether we choose sysroot or
not though.

Regards,

Richard




      reply	other threads:[~2007-09-24  8:55 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
2007-09-24  8:51   ` Richard Purdie [this message]

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=1190623862.6176.20.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --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.