From nobody Thu Feb 16 15:51:38 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHfZL5PKtz3qblS; Thu, 16 Feb 2023 15:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHfZL4y15z3wvp; Thu, 16 Feb 2023 15:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676562698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wvwdRse01UVjSYDv9+1ohsxwbHxDvHs2aBjJ3xYymnk=; b=UlE8AadiroD2HW1K5IWqWcaLgOe5zzRjdvmtGZgS0pu/2C/9TpAWR52sKkfuxRgUqzzc7d ehtgdCgO8YIUvW3tvAQaEQ6rdAJnX3CA0LJtmgKE/fUpCAhDZCeOXF2DQmJp/s19HkWjZf yn1ov+JqB+OW0q1KU+AqH1VD43AS+P3+5m52eG7sd6JPv+hdZDfQvff1agkc09vw8ypkQQ w5e7BM3p8XY7LolAhHXpfPVl5rRJxIMw1YgnhPEhtG6KvjtGYwL+P8AdUsxOgJKs7nynMs bB1/AWOjNjg94pitidqxoD3GplAiOZuPX4fuHLpA8WJm/QJr6HXmMXohfeabhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676562698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wvwdRse01UVjSYDv9+1ohsxwbHxDvHs2aBjJ3xYymnk=; b=ey/tZzFDvb/wsMWqmIR6grfwzkVy2q3LKedmaJqSXEIWaNcdt2VIIBpREj5Yxe/eF6jEAo XTBK1beqDLKlS4N+TW1R2JWGDktOLOMaxSW76ini1xi3F6EY2rWVOXYinJtw1yzxhpD1yK xdN2aSv1kG3/vBuLv5yj18sbUoKVIvyXK/iNl6VoCbQc5lmVXFwOzo6+OvSaMXurEgzWAA JB4QSH4H2Anvrox+wvCdRk8dagkhgz+WxAUnezySIr4m0jcHHf0w4o4UvSuwV9r88Y9xa2 S64SVKT/xlYe8RDvOla2Ikrlua8pPMxCpbQX/ETpfx6ZBwlbacyOvGYZBWFgSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676562698; a=rsa-sha256; cv=none; b=XekX1Knrgxth9NpvnZcnHofV2C7qEfP0C9y6Kk/wZpi2CJW4UrDOFta5CnMw+Y0SpbE2ug 68FgeEc36neyVnObIqx7APFI2m1vRgeUkEXrGMJ/UEHFCAVM7aBkNNZqjOUvuV1Re9KRYP uRZTbZRbwqBMyOhDF3BmLgGU2KpQfzA2enCgVAE1xc8nrLdxNV8HnCO/ku4Hv7cw0n1PpV vzrSu1tAa7GRz5QqNH3RaeQ0la3I961w4l1FfeSv6oceYoUX8TXaln+YZEMaNckv6NJaGC 35xFI9kjodU9ZptB97/wARm9B9OJbOMJmRwGF6vTeK0U4XlrRE8xa+7MDdCGnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PHfZL40hCz18YB; Thu, 16 Feb 2023 15:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31GFpcBA096770; Thu, 16 Feb 2023 15:51:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GFpcZX096769; Thu, 16 Feb 2023 15:51:38 GMT (envelope-from git) Date: Thu, 16 Feb 2023 15:51:38 GMT Message-Id: <202302161551.31GFpcZX096769@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: e3a17d6ec3d4 - main - SMP: Use nproc(1) instead of sysctl kern.smp.cpus List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3a17d6ec3d43f5af6cf259ac1cbc26ba0c83c73 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=e3a17d6ec3d43f5af6cf259ac1cbc26ba0c83c73 commit e3a17d6ec3d43f5af6cf259ac1cbc26ba0c83c73 Author: Mateusz Guzik AuthorDate: 2023-02-16 15:49:53 +0000 Commit: Baptiste Daroussin CommitDate: 2023-02-16 15:51:36 +0000 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 --- Mk/bsd.commands.mk | 1 + Mk/bsd.port.mk | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk index acc019e64912..27d9d3e2f47e 100644 --- a/Mk/bsd.commands.mk +++ b/Mk/bsd.commands.mk @@ -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 diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 184fbbfe3db3..47bdf9a49b18 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -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}