From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D1E2B158094 for ; Wed, 29 Jun 2022 16:28:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EC796E0BA4; Wed, 29 Jun 2022 16:28:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C83C9E0BA2 for ; Wed, 29 Jun 2022 16:28:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1A9E341A6B for ; Wed, 29 Jun 2022 16:28:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BFCB951B for ; Wed, 29 Jun 2022 16:28:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1656520084.21de97a13101b3195ee0acf8d9652d2471fe7d23.sam@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 21de97a13101b3195ee0acf8d9652d2471fe7d23 X-VCS-Branch: master Date: Wed, 29 Jun 2022 16:28:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d0c67e04-b3ab-46ab-8b5d-4c7ec8dad28c X-Archives-Hash: 30f79b79f71196e11dc1efe45074d994 commit: 21de97a13101b3195ee0acf8d9652d2471fe7d23 Author: Anna Vyalkova sysrq in> AuthorDate: Sat Jun 4 04:20:13 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 29 16:28:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=21de97a1 scripts/bootstrap-prefix.sh: enable ncpu detection for OpenBSD Signed-off-by: Anna Vyalkova sysrq.in> Signed-off-by: Sam James gentoo.org> scripts/bootstrap-prefix.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 906ce86bc7..c7de6d7ec7 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -2632,12 +2632,18 @@ EOF echo local ncpu= case "${CHOST}" in - *-cygwin*) ncpu=$(cmd /D /Q /C 'echo %NUMBER_OF_PROCESSORS%' | tr -d "\\r") ;; - *-darwin*) ncpu=$(/usr/sbin/sysctl -n hw.ncpu) ;; - *-freebsd*) ncpu=$(/sbin/sysctl -n hw.ncpu) ;; - *-solaris*) ncpu=$(/usr/sbin/psrinfo | wc -l) ;; - *-linux-gnu*) ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) ;; - *) ncpu=1 ;; + *-cygwin*) + ncpu=$(cmd /D /Q /C 'echo %NUMBER_OF_PROCESSORS%' | tr -d "\\r") ;; + *-darwin*) + ncpu=$(/usr/sbin/sysctl -n hw.ncpu) ;; + *-freebsd* | *-openbsd*) + ncpu=$(/sbin/sysctl -n hw.ncpu) ;; + *-solaris*) + ncpu=$(/usr/sbin/psrinfo | wc -l) ;; + *-linux-gnu*) + ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) ;; + *) + ncpu=1 ;; esac # get rid of excess spaces (at least Solaris wc does) ncpu=$((ncpu + 0))