[yocto] SDK: Missing 32 bit sysroot

Schmitt, Richard Richard.Schmitt at commscope.com
Wed Jan 4 06:35:43 PST 2017


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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170104/97149783/attachment.html>


More information about the yocto mailing list