summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel.spec b/kernel.spec
index 660d948d0..c9882313a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -22,6 +22,8 @@ Summary: The Linux kernel
%if %{zipmodules}
%global zipsed -e 's/\.ko$/\.ko.xz/'
+# for parallel xz processes, replace with 1 to go back to single process
+%global zcpu `nproc --all`
%endif
# define buildid .local
@@ -1559,7 +1561,7 @@ BuildKernel %make_target %kernel_image %{_use_vdso}
fi \
fi \
if [ "%{zipmodules}" -eq "1" ]; then \
- find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs xz; \
+ find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \
fi \
%{nil}