summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-11 21:13:23 +0100
committerSam James <sam@gentoo.org>2022-10-13 20:57:55 +0100
commitb86d9482f6ff14401970092b3034ef1cc2813163 (patch)
treef185dc8894ecc0169f10e4a8f71a57d0f6c3e509 /eclass/kernel-build.eclass
parentkernel-build.eclass: use pigz for parallel compression if available (diff)
downloadgentoo-b86d9482f6ff14401970092b3034ef1cc2813163.tar.gz
gentoo-b86d9482f6ff14401970092b3034ef1cc2813163.tar.bz2
gentoo-b86d9482f6ff14401970092b3034ef1cc2813163.zip
kernel-build.eclass: use pbzip2/lbzip2 for parallel compression if available
Note that this will only take effect if compressing modules with bzip2 (COMPRESS_MODULE_BZIP2 is set) or compressing the kernel with bzip2 (CONFIG_KERNEL_BZIP2 is set). Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r--eclass/kernel-build.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index faf36d763d08..cc99298811bc 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -98,13 +98,19 @@ kernel-build_src_configure() {
export ZSTD_NBTHREADS="$(makeopts_jobs)"
fi
- # pigz needs to take an argument, not an env var,
- # for its options, which won't work because of how the kernel build system
+ # pigz/pbzip2/lbzip2 all need to take an argument, not an env var,
+ # for their options, which won't work because of how the kernel build system
# uses the variables (e.g. passes directly to tar as an executable).
if type -P pigz ; then
MAKEARGS+=( KGZIP="pigz" )
fi
+ if type -P pbzip2 ; then
+ MAKEARGS+=( KBZIP2="pbzip2" )
+ elif type -P lbzip2 ; then
+ MAKEARGS+=( KBZIP2="lbzip2" )
+ fi
+
restore_config .config
[[ -f .config ]] || die "Ebuild error: please copy default config into .config"