Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Cc: dist-kernel@g.o, kernel@g.o, Sam James <sam@g.o>
Subject: [gentoo-dev] [PATCH 7/8] kernel-build.eclass: use pigz for parallel compression if available
Date: Tue, 11 Oct 2022 22:57:01
Message-Id: 20221011225444.56032-7-sam@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/8] kernel-2.eclass: decompress xz in parallel by Sam James
1 Note that this will only take effect if compressing modules with gzip
2 (COMPRESS_MODULE_GZIP is set) or compressing the kernel with gzip
3 (CONFIG_KERNEL_GZIP is set).
4
5 Signed-off-by: Sam James <sam@g.o>
6 ---
7 eclass/kernel-build.eclass | 7 +++++++
8 1 file changed, 7 insertions(+)
9
10 diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
11 index 936258e9e8af..faf36d763d08 100644
12 --- a/eclass/kernel-build.eclass
13 +++ b/eclass/kernel-build.eclass
14 @@ -98,6 +98,13 @@ kernel-build_src_configure() {
15 export ZSTD_NBTHREADS="$(makeopts_jobs)"
16 fi
17
18 + # pigz needs to take an argument, not an env var,
19 + # for its options, which won't work because of how the kernel build system
20 + # uses the variables (e.g. passes directly to tar as an executable).
21 + if type -P pigz ; then
22 + MAKEARGS+=( KGZIP="pigz" )
23 + fi
24 +
25 restore_config .config
26 [[ -f .config ]] || die "Ebuild error: please copy default config into .config"
27
28 --
29 2.38.0