Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS
@ 2015-07-07  7:17 Robert Yang
  2015-07-07  7:17 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Yang @ 2015-07-07  7:17 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit dd09fab685de2eaf04aa5ab60f8220b89c1deae9:

  tune-core2.inc: set X86ARCH32 to i686 (instead of i586) (2015-07-02 23:08:27 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/mlib
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/mlib

Robert Yang (1):
  toolchain-scripts.bbclass: use MLPREFIX to instead of
    MULTILIB_VARIANTS

 meta/classes/toolchain-scripts.bbclass |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS
  2015-07-07  7:17 [PATCH 0/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS Robert Yang
@ 2015-07-07  7:17 ` Robert Yang
  2015-07-07 13:22   ` Christopher Larson
  2015-07-07 22:14   ` Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Yang @ 2015-07-07  7:17 UTC (permalink / raw)
  To: openembedded-core

Fixed when enable multilib:
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake core-image-minimal

No lib32 package should be built since we don't build
lib32-core-image-minimal, but a lot them are built:
lib32-opkg-utils
lib32-cryptodev-linux
lib32-sqlite3
lib32-libtool-cross
lib32-ncurses
lib32-db
lib32-diffutils
lib32-zlib
lib32-gcc-cross-i686
lib32-gcc-cross-initial-i686
lib32-flex
lib32-libgcc-initial
lib32-libffi
lib32-linux-libc-headers
lib32-expat
lib32-openssl
lib32-glibc
lib32-binutils-cross-i686
lib32-gcc-runtime

This is because MULTILIB_VARIANTS is always avaliable when multlib is
enabled, use MLPREFIX to fix the problem so that lib32/lib64 packages will
only be built when build lib32/lib64-core-image-minimal.

[YOCTO #7961]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/toolchain-scripts.bbclass |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 9378918..d05a5a3 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -144,8 +144,9 @@ python __anonymous () {
     deps = ""
     for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
         deps += " %s:do_populate_sysroot" % dep
-        for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
-            clsextend = oe.classextend.ClassExtender(variant, d)
+        mlprefix = d.getVar('MLPREFIX', True)
+        if mlprefix:
+            clsextend = oe.classextend.ClassExtender(mlprefix[:-1], d)
             newdep = clsextend.extend_name(dep)
             deps += " %s:do_populate_sysroot" % newdep
     d.appendVarFlag('do_configure', 'depends', deps)
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS
  2015-07-07  7:17 ` [PATCH 1/1] " Robert Yang
@ 2015-07-07 13:22   ` Christopher Larson
  2015-07-07 22:14   ` Richard Purdie
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Larson @ 2015-07-07 13:22 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

On Tue, Jul 7, 2015 at 12:17 AM, Robert Yang <liezhi.yang@windriver.com>
wrote:

>      for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or
> "").split():
>          deps += " %s:do_populate_sysroot" % dep
> -        for variant in (d.getVar('MULTILIB_VARIANTS', True) or
> "").split():
> -            clsextend = oe.classextend.ClassExtender(variant, d)
> +        mlprefix = d.getVar('MLPREFIX', True)
> +        if mlprefix:
> +            clsextend = oe.classextend.ClassExtender(mlprefix[:-1], d)
>              newdep = clsextend.extend_name(dep)
>              deps += " %s:do_populate_sysroot" % newdep
>

Do we really want to get MLPREFIX and construct a ClassExtender for each
dep in TOOLCHAIN_NEED_CONFIGSITE_CACHE? Could we do those outside the loop?
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1468 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS
  2015-07-07  7:17 ` [PATCH 1/1] " Robert Yang
  2015-07-07 13:22   ` Christopher Larson
@ 2015-07-07 22:14   ` Richard Purdie
  2015-07-09  8:37     ` Robert Yang
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2015-07-07 22:14 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core

On Tue, 2015-07-07 at 00:17 -0700, Robert Yang wrote:
> Fixed when enable multilib:
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
> 
> $ bitbake core-image-minimal
> 
> No lib32 package should be built since we don't build
> lib32-core-image-minimal, but a lot them are built:
> lib32-opkg-utils
> lib32-cryptodev-linux
> lib32-sqlite3
> lib32-libtool-cross
> lib32-ncurses
> lib32-db
> lib32-diffutils
> lib32-zlib
> lib32-gcc-cross-i686
> lib32-gcc-cross-initial-i686
> lib32-flex
> lib32-libgcc-initial
> lib32-libffi
> lib32-linux-libc-headers
> lib32-expat
> lib32-openssl
> lib32-glibc
> lib32-binutils-cross-i686
> lib32-gcc-runtime
> 
> This is because MULTILIB_VARIANTS is always avaliable when multlib is
> enabled, use MLPREFIX to fix the problem so that lib32/lib64 packages will
> only be built when build lib32/lib64-core-image-minimal.
> 
> [YOCTO #7961]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/toolchain-scripts.bbclass |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
> index 9378918..d05a5a3 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -144,8 +144,9 @@ python __anonymous () {
>      deps = ""
>      for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
>          deps += " %s:do_populate_sysroot" % dep
> -        for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
> -            clsextend = oe.classextend.ClassExtender(variant, d)
> +        mlprefix = d.getVar('MLPREFIX', True)
> +        if mlprefix:
> +            clsextend = oe.classextend.ClassExtender(mlprefix[:-1], d)
>              newdep = clsextend.extend_name(dep)
>              deps += " %s:do_populate_sysroot" % newdep
>      d.appendVarFlag('do_configure', 'depends', deps)

I'm starting to get mildly annoyed with this. Back in 2014 it was
insisted the correct behaviour here was that the cache artefacts for
*all* multilibs shoul be pulled into the SDK. This was done with:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=bb213d8e60746d61d80505487d5f14a4eb45231b

where the code quite clearly iterates MULTILIB_VARIANTS for this reason.
We've therefore gone to some lengths to preserve that.

So which is this code supposed to do? I don't honestly know any more. I
do agree its extremely annoying that the images trigger the multilib
builds though and I think we need to fix that. This class is used from:

populate_sdk_base
meta-ide-support
meta-environment

so perhaps the best way to do this is have a function like:

def toolchain_get_depends(d):
    import oe.classextend
    deps = ""
    for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
        deps += " %s:do_populate_sysroot" % dep
        for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
            clsextend = oe.classextend.ClassExtender(variant, d)
            newdep = clsextend.extend_name(dep)
            deps += " %s:do_populate_sysroot" % newdep
    return deps

then meta-ide-support can do:

do_populate_ide_support[depends] += "${@toolchain_get_depends(d)}"

meta-environment can do:

do_generate_content[depends] += "${@toolchain_get_depends(d)}"

and I can't actually see why populate_sdk_base needs the
toolchain-scripts class at all. Perhaps someone can spot why it needs
the inherit or the dependency?

Cheers,

Richard




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS
  2015-07-07 22:14   ` Richard Purdie
@ 2015-07-09  8:37     ` Robert Yang
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2015-07-09  8:37 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core



On 07/08/2015 06:14 AM, Richard Purdie wrote:
> On Tue, 2015-07-07 at 00:17 -0700, Robert Yang wrote:
>> Fixed when enable multilib:
>> require conf/multilib.conf
>> MULTILIBS = "multilib:lib32"
>> DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
>>
>> $ bitbake core-image-minimal
>>
>> No lib32 package should be built since we don't build
>> lib32-core-image-minimal, but a lot them are built:
>> lib32-opkg-utils
>> lib32-cryptodev-linux
>> lib32-sqlite3
>> lib32-libtool-cross
>> lib32-ncurses
>> lib32-db
>> lib32-diffutils
>> lib32-zlib
>> lib32-gcc-cross-i686
>> lib32-gcc-cross-initial-i686
>> lib32-flex
>> lib32-libgcc-initial
>> lib32-libffi
>> lib32-linux-libc-headers
>> lib32-expat
>> lib32-openssl
>> lib32-glibc
>> lib32-binutils-cross-i686
>> lib32-gcc-runtime
>>
>> This is because MULTILIB_VARIANTS is always avaliable when multlib is
>> enabled, use MLPREFIX to fix the problem so that lib32/lib64 packages will
>> only be built when build lib32/lib64-core-image-minimal.
>>
>> [YOCTO #7961]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>   meta/classes/toolchain-scripts.bbclass |    5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
>> index 9378918..d05a5a3 100644
>> --- a/meta/classes/toolchain-scripts.bbclass
>> +++ b/meta/classes/toolchain-scripts.bbclass
>> @@ -144,8 +144,9 @@ python __anonymous () {
>>       deps = ""
>>       for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
>>           deps += " %s:do_populate_sysroot" % dep
>> -        for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
>> -            clsextend = oe.classextend.ClassExtender(variant, d)
>> +        mlprefix = d.getVar('MLPREFIX', True)
>> +        if mlprefix:
>> +            clsextend = oe.classextend.ClassExtender(mlprefix[:-1], d)
>>               newdep = clsextend.extend_name(dep)
>>               deps += " %s:do_populate_sysroot" % newdep
>>       d.appendVarFlag('do_configure', 'depends', deps)
>
> I'm starting to get mildly annoyed with this. Back in 2014 it was
> insisted the correct behaviour here was that the cache artefacts for
> *all* multilibs shoul be pulled into the SDK. This was done with:
>
> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=bb213d8e60746d61d80505487d5f14a4eb45231b
>
> where the code quite clearly iterates MULTILIB_VARIANTS for this reason.
> We've therefore gone to some lengths to preserve that.
>
> So which is this code supposed to do? I don't honestly know any more. I
> do agree its extremely annoying that the images trigger the multilib
> builds though and I think we need to fix that. This class is used from:
>
> populate_sdk_base
> meta-ide-support
> meta-environment
>
> so perhaps the best way to do this is have a function like:
>
> def toolchain_get_depends(d):
>      import oe.classextend
>      deps = ""
>      for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
>          deps += " %s:do_populate_sysroot" % dep
>          for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
>              clsextend = oe.classextend.ClassExtender(variant, d)
>              newdep = clsextend.extend_name(dep)
>              deps += " %s:do_populate_sysroot" % newdep
>      return deps
>
> then meta-ide-support can do:
>
> do_populate_ide_support[depends] += "${@toolchain_get_depends(d)}"
>
> meta-environment can do:
>
> do_generate_content[depends] += "${@toolchain_get_depends(d)}"
>
> and I can't actually see why populate_sdk_base needs the
> toolchain-scripts class at all. Perhaps someone can spot why it needs
> the inherit or the dependency?

Hi RP,

Thanks, after more investigation, I think that populate_sdk_base doesn't need
inherit toolchain-scripts, and once we remove it from populate_sdk_base.bbclass,
things work well, which means that when "bitbake core-image-minimal", no
lib32 recipes build, and when "bitbake lib32-core-image-minimal", the required
lib32 recipes will be built and installed to sdk.

We can drop this patch, and I will send a new patch to fix the problem.

// Robert

>
> Cheers,
>
> Richard
>
>
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-09  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07  7:17 [PATCH 0/1] toolchain-scripts.bbclass: use MLPREFIX to instead of MULTILIB_VARIANTS Robert Yang
2015-07-07  7:17 ` [PATCH 1/1] " Robert Yang
2015-07-07 13:22   ` Christopher Larson
2015-07-07 22:14   ` Richard Purdie
2015-07-09  8:37     ` Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox