From 09e3e41cb80c3796d463858b7ee76e2461eb29c6 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 11 Oct 2022 20:42:26 +0100 Subject: linux-mod.eclass: compress xz/zstd in parallel Signed-off-by: Sam James --- eclass/linux-mod.eclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'eclass') 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_ (NONE, GZIP, XZ, ZSTD) + # check here for CONFIG_MODULE_COMPRESS_ (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" -- cgit v1.2.3-65-gdbad