Note that this will only take effect if compressing modules with xz or zstd (COMPRESS_MODULE_XZ is set or COMPRESS_MODULE_ZSTD is set respectively)
... or if compiling the kernel with xz or zstd (COMPRESS_KERNEL_XZ or COMPRESS_KERNEL_ZSTD is set respectiely). Signed-off-by: Sam James <s...@gentoo.org> --- eclass/kernel-build.eclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 98a385bf72c0..936258e9e8af 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -29,7 +29,7 @@ esac PYTHON_COMPAT=( python3_{8..11} ) -inherit python-any-r1 savedconfig toolchain-funcs kernel-install +inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install BDEPEND=" ${PYTHON_DEPS} @@ -90,6 +90,14 @@ kernel-build_src_configure() { ARCH=$(tc-arch-kernel) ) + if type -P xz ; then + export XZ_OPT="-T$(makeopts_jobs)" + fi + + if type -P zstd ; then + export ZSTD_NBTHREADS="$(makeopts_jobs)" + fi + restore_config .config [[ -f .config ]] || die "Ebuild error: please copy default config into .config" -- 2.38.0