diff options
author | Sam James <sam@gentoo.org> | 2022-10-11 20:55:40 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-13 20:57:54 +0100 |
commit | 61f0eab4e3c0272449024e83f32734b0e6d392bb (patch) | |
tree | 2e7a367e41ce61dece57f3b0f119dc1e945c92d7 /eclass/kernel-build.eclass | |
parent | kernel-build.eclass: compress xz/zstd in parallel (diff) | |
download | gentoo-61f0eab4e3c0272449024e83f32734b0e6d392bb.tar.gz gentoo-61f0eab4e3c0272449024e83f32734b0e6d392bb.tar.bz2 gentoo-61f0eab4e3c0272449024e83f32734b0e6d392bb.zip |
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@gentoo.org>
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r-- | eclass/kernel-build.eclass | 7 |
1 files changed, 7 insertions, 0 deletions
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" |