platform.in: change %__nprocs definition to use %getncpus instead of nproc(1)

Both use sched_getaffinity(2), but %getncpus is built-in and saves fork
and execve.

Suggested-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Виталий Чикунов 2020-11-17 03:39:56 +03:00
parent 6ffa199751
commit 117a2e6042

View File

@ -240,7 +240,7 @@
# Make
%_make_bin make
%__nprocs %(N=`nproc`; [ "$N" -gt 0 ] 2>/dev/null && echo "$N" || echo 1)
%__nprocs %getncpus
%_smp_mflags -j${NPROCS:-%__nprocs}
%make_build %_make_bin %_smp_mflags