summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-11 20:42:26 +0100
committerSam James <sam@gentoo.org>2022-10-13 20:57:52 +0100
commit09e3e41cb80c3796d463858b7ee76e2461eb29c6 (patch)
tree687cb0b42f4f5d1f9f367c9bb67c9517d72f9303 /eclass
parentkernel-2.eclass: decompress xz in parallel (diff)
downloadgentoo-09e3e41cb80c3796d463858b7ee76e2461eb29c6.tar.gz
gentoo-09e3e41cb80c3796d463858b7ee76e2461eb29c6.tar.bz2
gentoo-09e3e41cb80c3796d463858b7ee76e2461eb29c6.zip
linux-mod.eclass: compress xz/zstd in parallel
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-mod.eclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index b7c13cbf7e76..8f511ba8ff05 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -163,7 +163,7 @@ _LINUX_MOD_ECLASS=1
# TODO: When adding support for future EAPIs, please audit this list
# for unused inherits and conditionalise them.
-inherit linux-info multilib toolchain-funcs
+inherit linux-info multilib multiprocessing toolchain-funcs
case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in
[nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;;
@@ -712,17 +712,17 @@ linux-mod_src_install() {
cd "${objdir}" || die "${objdir} does not exist"
insinto "${INSTALL_MOD_PATH}"/lib/modules/${KV_FULL}/${libdir}
- # check here for CONFIG_MODULE_COMPRESS_<compression option> (NONE, GZIP, XZ, ZSTD)
+ # check here for CONFIG_MODULE_COMPRESS_<compression option> (NONE, GZIP, XZ, ZSTD)
# and similarily compress the module being built if != NONE.
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
- xz ${modulename}.${KV_OBJ}
+ xz -T$(makeopts_jobs) ${modulename}.${KV_OBJ}
doins ${modulename}.${KV_OBJ}.xz || die "doins ${modulename}.${KV_OBJ}.xz failed"
elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
gzip ${modulename}.${KV_OBJ}
doins ${modulename}.${KV_OBJ}.gz || die "doins ${modulename}.${KV_OBJ}.gz failed"
elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
- zstd ${modulename}.${KV_OBJ}
+ zstd -T$(makeopts_jobs) ${modulename}.${KV_OBJ}
doins ${modulename}.${KV_OBJ}.zst || die "doins ${modulename}.${KV_OBJ}.zst failed"
else
doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"