summaryrefslogtreecommitdiff
path: root/eclass/kernel-build.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-14 01:43:18 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-14 01:43:18 +0100
commit30737dc88991519b90363c2c7bae8fd049098d13 (patch)
tree765be9d1f204022a140e3ce7307c5bee63420459 /eclass/kernel-build.eclass
parent174cda0f83caffc0ee683143e9b2c501ef589cc1 (diff)
gentoo auto-resync : 14:10:2022 - 01:43:18
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r--eclass/kernel-build.eclass23
1 files changed, 22 insertions, 1 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 98a385bf72c0..1fa25cbc9574 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -29,7 +29,7 @@ esac
PYTHON_COMPAT=( python3_{8..11} )
-inherit python-any-r1 savedconfig toolchain-funcs kernel-install
+inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install
BDEPEND="
${PYTHON_DEPS}
@@ -90,6 +90,27 @@ kernel-build_src_configure() {
ARCH=$(tc-arch-kernel)
)
+ if type -P xz &>/dev/null ; then
+ export XZ_OPT="-T$(makeopts_jobs)"
+ fi
+
+ if type -P zstd &>/dev/null ; then
+ export ZSTD_NBTHREADS="$(makeopts_jobs)"
+ fi
+
+ # pigz/pbzip2/lbzip2 all need to take an argument, not an env var,
+ # for their 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 &>/dev/null ; then
+ MAKEARGS+=( KGZIP="pigz" )
+ fi
+
+ if type -P pbzip2 &>/dev/null ; then
+ MAKEARGS+=( KBZIP2="pbzip2" )
+ elif type -P lbzip2 &>/dev/null ; then
+ MAKEARGS+=( KBZIP2="lbzip2" )
+ fi
+
restore_config .config
[[ -f .config ]] || die "Ebuild error: please copy default config into .config"