From 6b70d5f03b688ee24df38ea669c0d800a6ad3b49 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 18 Sep 2023 10:15:10 +0000 Subject: drop GNU nproc(1) support in favor of getconf(1) `getconf NPROCESSORS_ONLN' will succeed on GNU/Linux systems anyways; and the non-underscore-prefixed invocation works fine on all BSD flavors tested. Thus the `nproc' and `gnproc' attempts will never be reached. The only downside is we lose the ability to account for CPU affinity, but that's probably not an issue since CPU affinity (AFAIK) isn't a commonly-used feature. --- Makefile.PL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 5b7914dc..97e00395 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -199,8 +199,8 @@ WriteMakefile( ); sub MY::postamble { - my $N = (`{ getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN || - gnproc || nproc; } 2>/dev/null` || 1); + my $N = (`{ getconf _NPROCESSORS_ONLN || + getconf NPROCESSORS_ONLN; } 2>/dev/null` || 1); $N += 1; # account for sleeps in some tests (and makes an IV) <