summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-11-08 16:02:24 +0200
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commit3caf55b397c431537cd18f884e57005efdd2d455 (patch)
tree4f2afa3aaf503ea11342417113b169925a1750d3
parent8fc32c9a82bff78ccef6c588a60ba685da7c277c (diff)
downloadrpm-3caf55b397c431537cd18f884e57005efdd2d455.tar.gz
Make %_smp_mflags build rather than parse time determined
Decisions about number of CPUs to use need to be determinable at the exact time of build, the moment of parsing has little to do with it. Have %_smp_mflags take its value from the environment which we do control at the time of build, rather than the spec parse moment. (cherry picked from commit 0576d24756fe975d890f5535a21cfdfd35fc2ca4)
-rw-r--r--macros.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/macros.in b/macros.in
index a81787f30..b2cd524f3 100644
--- a/macros.in
+++ b/macros.in
@@ -708,7 +708,7 @@ package or when debugging this package.\
if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
echo "$RPM_BUILD_NCPUS";)
-%_smp_mflags -j%{_smp_build_ncpus}
+%_smp_mflags -j${RPM_BUILD_NCPUS}
# Maximum number of threads to use when building, 0 for unlimited
#%_smp_nthreads_max 0