On Sat, Dec 15, 2012 at 09:35:18AM -0500, Paul Smith wrote:
> On Fri, 2012-12-14 at 17:07 +0200, Eli Zaretskii wrote:
> > Does it even make sense to use -j with no arguments?  Should we
> > perhaps remove that possibility, or have some internal sane limit,
> > like twice the number of cores, say?
> 
> In general I'd say no, the current behavior is not ideal.  However I
> don't want to remove the behavior.  I'd rather have the default, if
> given no argument, choose a "sane" limit.  However, how does one detect
> the number of cores on a system in a portable way?  It's easy enough on
> Linux but...

gnulib has a nproc module that can "detect the number of processors":
http://git.savannah.gnu.org/cgit/gnulib.git/tree/modules/nproc
Judging from the number of #if's in its implementation it must be quite
portable. :)


-- 
ldv

Attachment: pgp0F7IV2U4pb.pgp
Description: PGP signature

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to