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 2/8] linux-mod.eclass: compress xz/zstd in parallel
Date: Tue, 11 Oct 2022 22:55:33
Message-Id: 20221011225444.56032-2-sam@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/8] kernel-2.eclass: decompress xz in parallel by Sam James
1 Signed-off-by: Sam James <sam@g.o>
2 ---
3 eclass/linux-mod.eclass | 8 ++++----
4 1 file changed, 4 insertions(+), 4 deletions(-)
5
6 diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
7 index b7c13cbf7e76..8f511ba8ff05 100644
8 --- a/eclass/linux-mod.eclass
9 +++ b/eclass/linux-mod.eclass
10 @@ -163,7 +163,7 @@ _LINUX_MOD_ECLASS=1
11
12 # TODO: When adding support for future EAPIs, please audit this list
13 # for unused inherits and conditionalise them.
14 -inherit linux-info multilib toolchain-funcs
15 +inherit linux-info multilib multiprocessing toolchain-funcs
16
17 case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in
18 [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;;
19 @@ -712,17 +712,17 @@ linux-mod_src_install() {
20 cd "${objdir}" || die "${objdir} does not exist"
21 insinto "${INSTALL_MOD_PATH}"/lib/modules/${KV_FULL}/${libdir}
22
23 - # check here for CONFIG_MODULE_COMPRESS_<compression option> (NONE, GZIP, XZ, ZSTD)
24 + # check here for CONFIG_MODULE_COMPRESS_<compression option> (NONE, GZIP, XZ, ZSTD)
25 # and similarily compress the module being built if != NONE.
26
27 if linux_chkconfig_present MODULE_COMPRESS_XZ; then
28 - xz ${modulename}.${KV_OBJ}
29 + xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ}
30 doins ${modulename}.${KV_OBJ}.xz || die "doins ${modulename}.${KV_OBJ}.xz failed"
31 elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
32 gzip ${modulename}.${KV_OBJ}
33 doins ${modulename}.${KV_OBJ}.gz || die "doins ${modulename}.${KV_OBJ}.gz failed"
34 elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
35 - zstd ${modulename}.${KV_OBJ}
36 + zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ}
37 doins ${modulename}.${KV_OBJ}.zst || die "doins ${modulename}.${KV_OBJ}.zst failed"
38 else
39 doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"
40 --
41 2.38.0

Replies