From 30737dc88991519b90363c2c7bae8fd049098d13 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 14 Oct 2022 01:43:18 +0100 Subject: gentoo auto-resync : 14:10:2022 - 01:43:18 --- eclass/kernel-build.eclass | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'eclass/kernel-build.eclass') 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" -- cgit v1.2.3