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 <s...@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"
 
-- 
2.38.0


Reply via email to