All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Mike Crowe <mac@mcrowe.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: Building and using a second toolchain
Date: Thu, 07 Sep 2017 22:28:56 +0100	[thread overview]
Message-ID: <1504819736.726.26.camel@linuxfoundation.org> (raw)
In-Reply-To: <20170907170007.ixl53bwhjmk7iwob@mcrowe.com>

On Thu, 2017-09-07 at 18:00 +0100, Mike Crowe wrote:
> On Thursday 07 September 2017 at 13:21:09 +0100, Richard Purdie wrote:
> > 
> > defined for the 64 bit system, then just use its 32 bit compiler?
> I'd persuaded myself that multilib was the x86-style -m32/-m64 thing on one
> compiler binary and it appeared that ARM didn't do that.
> 
> But, now I've read up on
> http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#combining-multiple-versions-library-files-into-one-image
> and played around I see that oe-core multilib support does generate
> multiple compiler binaries.
> 
> I'm able to generate a second compiler with a machine file containing:
> 
>  require conf/machine/include/arm/arch-armv8.inc

This is a less walked path on arm than it is in the x86 world. For x86,
tune-corei7 includes tune-i586 for example so it 'stacks' neatly and
you have the various compatible tune options available.

I suspect a glitch in the inheritance order of the arm tune files in
other to make this work. That said, is there much difference in
practise between armv7at-neon and cortexa15t?

>  require conf/multilib.conf
>  MULTILIBS = "multilib:lib32"
>  DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
> 
> However, what I really want to use is:
> 
>  DEFAULTTUNE_virtclass-multilib-lib32 = "cortexa15t"
> 
> but this fails in the sanity checker with:
> 
>     Toolchain tunings invalid:
>     Tuning 'cortexa15t' has no defined features, and cannot be used.
> 
> and if I add
> 
>  require conf/machine/include/tune-cortexa15.inc
> 
> then I get oodles of duplicate-inclusion warnings and I no longer seem to
> be generating an aarch64 compiler.
> 
> I'm not really sure where the split between arch and tune is supposed to be
> in that include directory, so whilst I could probably hack it to work, I
> doubt it would be acceptable to you.



> 
> So, I went back to using armv7at-neon and managed to generate a compiler.
> In my bootloader recipe I added:
> 
>  DEPENDS_aarch64_append = "virtual/lib32-arm-oemllib32-linux-gnueabi-gcc"
> 
> which results in the compiler ending up in recipe-sysroot-native, but also
> ends up with the associated libs32-recipe-sysroot installed outside the work
> directory in:
> 
>  work/${MACHINE}-oemllib32-linux-gnueabi/bootloader/7-r0/lib32-recipe-sysroot/
> 
> which doesn't appear to break anything until I run the clean task on
> bootloader and it doesn't get cleaned up. This means that subsequent builds
> fail because the files in lib32-recipe-sysroot already exist. :(
> 
> (I'm not up-to-date with oe-core master, but I looked through the changes
> that I don't have yet and couldn't spot anything that looked like it would
> address these problems. If you prefer, I can try to reproduce both with the
> current tip of master.)
> 
> Your suggestion has been a great help, but it looks like I'm not quite
> there yet.

Glad its at least sort of there. You're actually using the multilib in
a different way to the one it'd normally get used as you're trying to
put both into one build and its only really designed for one or the
other.

What would be "normal" is to build "lib32-bootloader" which is the
lib32 BBCLASSEXTEND'd variant of bootloader. If the 64 bit version
doesn't make sense you can make that raise SkipRecipe for the nonsense
variants.

I'm hoping if you do that the sysroot issue goes away. 

Cheers,

Richard


  reply	other threads:[~2017-09-07 21:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 11:13 Building and using a second toolchain Mike Crowe
2017-09-07 12:21 ` Richard Purdie
2017-09-07 17:00   ` Mike Crowe
2017-09-07 21:28     ` Richard Purdie [this message]
2017-09-08  6:04       ` Mike Crowe
2017-09-08  6:53         ` Richard Purdie
2017-10-05 17:12           ` Mike Crowe

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=1504819736.726.26.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=mac@mcrowe.com \
    --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 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.