[oe-commits] [openembedded-core] 03/28: bitbake.conf: more deterministic xz compression (threads)

git at git.openembedded.org git at git.openembedded.org
Fri Mar 6 08:19:46 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit d96aa8594c8d7531da34645cadbac4f7549d8ae6
Author: André Draszik <git at andred.net>
AuthorDate: Tue Mar 3 16:05:11 2020 +0000

    bitbake.conf: more deterministic xz compression (threads)
    
    xz archives can be non-deterministic / non-reproducible:
        a) archives are created differently in single- vs
           multi-threaded modes
        b) xz will scale down the compression level so as to
           be try to work within any memory limit given to
           it when operating in single-threaded mode
    
    This means that due to bitbake's default of using as many
    threads as there are cores in the system, files compressed
    with xz will be different if built on a multi-core system
    compared to single-core systems. They will also potentially
    be different if built on single-core systems with different
    amounts of physical memory, due to bitbake's default of
    limiting xz's memory consumption.
    
    Force multi-threaded operation by default, even on single-core
    systems, so as to ensure archives are created in the same
    way in all cases.
    
    Signed-off-by: André Draszik <git at andred.net>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e201b67..131ba29 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -795,7 +795,7 @@ BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
 PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
 
 # Default parallelism and resource usage for xz
-XZ_DEFAULTS ?= "--memlimit=50% --threads=${@oe.utils.cpu_count()}"
+XZ_DEFAULTS ?= "--memlimit=50% --threads=${@oe.utils.cpu_count(at_least=2)}"
 
 ##################################################################
 # Magic Cookie for SANITY CHECK

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list