commit: 61f0eab4e3c0272449024e83f32734b0e6d392bb Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Oct 11 19:55:40 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Oct 13 19:57:54 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61f0eab4
kernel-build.eclass: use pigz for parallel compression if available Note that this will only take effect if compressing modules with gzip (COMPRESS_MODULE_GZIP is set) or compressing the kernel with gzip (CONFIG_KERNEL_GZIP is set). Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/kernel-build.eclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 936258e9e8af..faf36d763d08 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -98,6 +98,13 @@ 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 + # uses the variables (e.g. passes directly to tar as an executable). + if type -P pigz ; then + MAKEARGS+=( KGZIP="pigz" ) + fi + restore_config .config [[ -f .config ]] || die "Ebuild error: please copy default config into .config"