Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Arch specific compilers (instead of tune specific)
Date: Tue, 22 Apr 2014 15:57:28 +0100	[thread overview]
Message-ID: <1398178648.16672.47.camel@ted> (raw)

Right now we build multiple different versions of gcc-cross, effectively
one per target tune. This is somewhat inefficient and the problem just
gets worse when you bring multilibs into the equation.

In theory at least, we can actually use the same cross binaries
(binutils/gcc/gdb) for all tunes for a given architecture. We've already
proven this is possible with the changes to the -cross-canadian
variants.

There are some things we don't currently support well too such as
multilib SDKs and 64 bit kernels with 32 bit userspace.

In the 1.7 timeframe I'd therefore like to propose we re-work the
gcc-cross recipes to have common architecture specific binaries. The
advantage would be fewer builds of gcc, better sstate cache reuse (and
size) and faster turnaround when switching tunes.

I've already experimented with patches for this and have something that
roughly works at:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t67&id=9c10238df1b2a5d818b289f85d2b9a13e2a886e9

This patch makes the cross recipes more like native ones with a new arch
suffix to the cross recipe.

At the practical level there are some challenges:

a) We need to split out a libgcc-initial from gcc-cross-intial since
this is target specific.
b) We need to stop gcc-cross and -initial from building libgcc but we
still need the unwind.h header it installs.
c) We need to remove references to tunes from the arch specific parts.
This includes the gcc float option code.
d) Need to remove the sstate dependency of gcc-cross-${TARGET_ARCH} on
libc
e) To allow libgcc-initial to work, we need to save out the
gcc-cross-initial artefacts. I'm hoping we can slim these down a little
(for gcc-cross too).

I'll split that patch into a number of patches and alter it to better
reuse the libgcc code now I have an idea what I'm aiming for.

I'd also note that this change doesn't yet optimise the multilib
toolchain build but that should be an easy step from this patch.

We may need to end up listing a hard list of "aliases" for the toolchain
on each arch rather than some of the funky multilib parsing we currently
do for simplicity. There are only a finite set of permutations supported
anyway.

The purpose of the email is to give people a headsup this is coming and
let people take a look at the preliminary code. 

Khem: Particularly interested in your thoughts! :)

Cheers,

Richard




             reply	other threads:[~2014-04-22 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 14:57 Richard Purdie [this message]
2014-04-23  3:32 ` Arch specific compilers (instead of tune specific) Khem Raj

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=1398178648.16672.47.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox