mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
SMP: Use nproc(1) instead of sysctl kern.smp.cpus
The former respects cpuset, while the latter does not. $ cpuset -l 1 -- make -V MAKE_JOBS_NUMBER 1 As nproc is newly introduced, keep the previous variant as a fallback for the time being. Differential Revision: https://reviews.freebsd.org/D38457
This commit is contained in:
parent
22885407b3
commit
e3a17d6ec3
@ -64,6 +64,7 @@ MOUNT_DEVFS?= ${MOUNT} -t devfs devfs
|
||||
# a make target
|
||||
MOUNT_NULLFS?= /sbin/mount_nullfs
|
||||
MV?= /bin/mv
|
||||
NPROC?= /bin/nproc
|
||||
OBJCOPY?= /usr/bin/objcopy
|
||||
OBJDUMP?= /usr/bin/objdump
|
||||
PASTE?= /usr/bin/paste
|
||||
|
@ -2041,7 +2041,7 @@ MAKE_JOBS_NUMBER= 1
|
||||
_MAKE_JOBS_NUMBER:= ${MAKE_JOBS_NUMBER}
|
||||
. else
|
||||
. if !defined(_SMP_CPUS)
|
||||
_SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus
|
||||
_SMP_CPUS!= ${NPROC} 2>/dev/null || ${SYSCTL} -n kern.smp.cpus
|
||||
. endif
|
||||
_EXPORTED_VARS+= _SMP_CPUS
|
||||
_MAKE_JOBS_NUMBER= ${_SMP_CPUS}
|
||||
|
Loading…
Reference in New Issue
Block a user