Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] use nproc
Date: Fri, 30 Dec 2016 21:46:43 +0100	[thread overview]
Message-ID: <87zijd87rg.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <6f25e6c1-c176-629f-321c-9b404c5d6de6@landley.net> (Rob Landley's message of "Fri, 30 Dec 2016 14:14:46 -0600")

>>>>> "Rob" == Rob Landley <rob@landley.net> writes:

 > My rule of thumb is that once a change is 7 years old, you can rely on
 > the installed base to have it. With that in mind, would you like to use
 > nproc to check how many processors are available?

 > http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=74cf4cb26dcecd36eb45dc00dbd4587d9dc24a2f

Why? What is the advantage? Purely cosmetical? Are there any well known
distributions providing nproc and not getconf?

 > diff --git a/package/Makefile.in b/package/Makefile.in
 > index afd5d3a..5eed804 100644
 > --- a/package/Makefile.in
 > +++ b/package/Makefile.in
 > @@ -12,7 +12,7 @@ HOSTMAKE := $(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make)
 >  # If the number of processors is not available, assume one.
 >  ifeq ($(BR2_JLEVEL),0)
 >  PARALLEL_JOBS := $(shell echo \
 > -	$$((1 + `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`)))
 > +	$$((1 + `nproc 2>/dev/null || echo 1`)))
 >  else
 >  PARALLEL_JOBS := $(BR2_JLEVEL)
 >  endif


 > _______________________________________________
 > buildroot mailing list
 > buildroot at busybox.net
 > http://lists.busybox.net/mailman/listinfo/buildroot

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2016-12-30 20:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 20:14 [Buildroot] [PATCH] use nproc Rob Landley
2016-12-30 20:46 ` Peter Korsgaard [this message]
2017-01-01  8:32   ` Thomas Petazzoni
2017-01-01  9:46     ` Peter Korsgaard
2017-01-01  8:30 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zijd87rg.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox