Multilib: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Created page with '== Vision == Provide the ability to build multiple arch library in one image, for example, in x86_64 arch, provide lib32, lib64, or even libx32. == Task Base == Richard has work…')
 
Line 2: Line 2:
Provide the ability to build multiple arch library in one image, for example, in x86_64 arch, provide lib32, lib64, or even libx32.
Provide the ability to build multiple arch library in one image, for example, in x86_64 arch, provide lib32, lib64, or even libx32.


== Task Base ==
== Basic Infrastructure ==
Richard has work out the base infrastructure http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=rpurdie/ml, with the following comments:
Richard already work out the base infrastructure '''http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=rpurdie/ml'''
 
'''Notes'''


"
"
Line 14: Line 16:
* When adding parameter support to BBCLASSEXTEND I added some variables so the class can figure out which class is being processed and what the parameter is. Related to this is the issue that bbclass event handlers once added always get called, even if the class isn't inherited in a subsequent recipe file!
* When adding parameter support to BBCLASSEXTEND I added some variables so the class can figure out which class is being processed and what the parameter is. Related to this is the issue that bbclass event handlers once added always get called, even if the class isn't inherited in a subsequent recipe file!


* I switched to using <multilib>- as the prefix for multilib recipes.
* I switched to using <multilib>- as the prefix for multilib recipes. This was because using the ":" character didn't work out as it gets placed into paths in too many places if you add it to PN.
This was because using the ":" character didn't work out as it gets placed into paths in too many places if you add it to PN.


* I've made the assumption that if a name in PACKAGES uses PN, its at the start.
* I've made the assumption that if a name in PACKAGES uses PN, its at the start.
Line 24: Line 25:


* I had to introduce MLPREFIX for use in certain places, thankfully all in places "normal" recipes shouldn't need to use it.
* I had to introduce MLPREFIX for use in certain places, thankfully all in places "normal" recipes shouldn't need to use it.
''' How to use it '''
* Step 1: add the following in local.conf
require conf/multilib.conf
MULTILIBS = "multilib:lib32 multilib:lib64"
* Step 2: bitbake zlib lib64-zlib lib32-zlib


== Task Breakdown ==
== Task Breakdown ==

Revision as of 06:03, 23 June 2011

Vision

Provide the ability to build multiple arch library in one image, for example, in x86_64 arch, provide lib32, lib64, or even libx32.

Basic Infrastructure

Richard already work out the base infrastructure http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=rpurdie/ml

Notes

" There have been a few issues and some lessons to learn. I've also have to make some implementation decisions based on the issues we were running into. To summarize them:

  • bitbake has issues if you try and delete variables from the data store. Patches two and three on the branch fix the issues I was seeing. More details are in the commits.
  • I found the recent additional event in bitbake wasn't in the right place to optimally support multilib so I had to move the expandKeys() call. Since the only known user is the native/nativesdk classes in OE-Core, this should be ok to do at this point. Again, the commit has the specific details.
  • When adding parameter support to BBCLASSEXTEND I added some variables so the class can figure out which class is being processed and what the parameter is. Related to this is the issue that bbclass event handlers once added always get called, even if the class isn't inherited in a subsequent recipe file!
  • I switched to using <multilib>- as the prefix for multilib recipes. This was because using the ":" character didn't work out as it gets placed into paths in too many places if you add it to PN.
  • I've made the assumption that if a name in PACKAGES uses PN, its at the start.
  • The use of := in cross.bbclass makes life hard for multilib. There is a special section of multilib.bbclass devoted to handling those variables. Initially I approached this as two separate multilib classes but these are merged together now.
  • I set the TARGET_VENDOR to the horrendously ugly string "-pokymllib32". The reason is that any "-" characters in there breaks config.sub at present and other separators cause other issues. I suspect we can fix that going forward but for now it works albeit looking horrible.
  • I had to introduce MLPREFIX for use in certain places, thankfully all in places "normal" recipes shouldn't need to use it.

How to use it

  • Step 1: add the following in local.conf

require conf/multilib.conf

MULTILIBS = "multilib:lib32 multilib:lib64"

  • Step 2: bitbake zlib lib64-zlib lib32-zlib

Task Breakdown