[yocto] SDK: Missing 32 bit sysroot

Khem Raj raj.khem at gmail.com
Wed Jan 4 17:22:50 PST 2017


On Wed, Jan 4, 2017 at 6:35 AM, Schmitt, Richard
<Richard.Schmitt at commscope.com> wrote:
> I have a ARM 32/64 multilib environment set up in my yocto based project.
> Everythings working fine.  Almost.  I am using the poky krogoth branch with
> the patch for “bug 1357”
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=1357 cherry-picked.
>
>
>
> When I populate the SDK and install it, I do get two toolchains with the
> correct multilibs and the correct environment setup files
>
>
>
> The two environment setup files are:
>
>
>
> environment-setup-aarch32hf-neon-fp-armv8-pokymllib32-linux-gnueabi
>
> environment-setup-aarch64-poky-linux
>
>
>
> The two respective toolchains are:
>
>
>
> arm-pokymllib32-linux-gnueabi-
>
> aarch64-poky-linux-
>
>
>
> Both of these toolchains are set up to use the 64 bit arm sysroot:
>
>
>
> /opt/poky/2.1.2/sysroots/aarch64-poky-linux
>
>
>
> There is one small issue.  The ARM sysroot that is exported contains linux
> include files that can only be used by the 64 bit toolchain.  For example:
>
>
>
> Within the aarch64 sysroot, the linux include file:
>
>
>
> /opt/poky/2.1.2/sysroots/aarch64-poky-linux/usr/include/asm/sigcontext.h
>
>
>
> Contains the implicit type __uint128_t.  This type is not defined when using
> the arm-pokymllib32-linux-gnueabi- toolchain so any 32 bit that includes
> <signal.h> will fail to compile.


__uint128_t is implicit type defined by gcc internally on certain
architectures which can support 128bit int.
however this does mean that the headers which are assuming this to be
available should be made multilib
so you might need to use oe_multilib_header to install multilib
specific versions of the file which is asking
for this type.

>
>
>
> In my yocto build directory, I have a target sysroot for both the 32 bit and
> 64 bit environments:
>
>
>
> tmp/sysroot/lib32-machine
>
> tmp/sysroot/machine
>
>
>
> where machine is the value of the MACHINE define.
>
>
>
> These two sysroots contain different usr/include/asm/sigcontext.h files.
>
>
>
> If I copy over the lib32-machine sysroot to the opt/poky/sysroots directory
> and use that sysroot when compiling 32 bit apps, things appear to work.
>
>
>
> Now I am not quite sure the right way to fix this.  There are at least three
> possibilities:
>
>
>
> 1.       The 32 bit toolchain should be able to understand __uint128_t even
> if it interprets to an array blob
>
> 2.       Yocto populate_sdk should export the 32 and 64 bit sysroots
>
> 3.       glibc should create include files that are useable in both 32 and
> 64 bit environments.
>
>
>
> What are folks thoughts here?  Right now I’m manually doing #2.
>
>
>
> Thanks,
>
> Rich
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list