use nproc
PATCH 1/1 use nproc
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?
package/Makefile.in +1 -1
@@ -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
PATCH 1/1 use nproc
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Rob" == Rob Landley <[email protected]> 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?
Why? What is the advantage? Purely cosmetical? Are there any well known distributions providing nproc and not getconf?
Quoted 19 lines
package/Makefile.in +1
-1@@ -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
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 use nproc
Hello,
Quoted 8 lines · Peter Korsgaard
Quoted 5 lines
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?
Why? What is the advantage? Purely cosmetical? Are there any well known distributions providing nproc and not getconf?
Well, the simplification provided by Rob looks useful to me. It's purely cosmetic, but we also do tons of other cosmetic changes.
The big question is whether nconf is available even in the really old RHEL distros that some of our users have.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 use nproc
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hello,
Quoted 4 lines · Peter Korsgaard
Quoted 3 lines
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?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Why? What is the advantage? Purely cosmetical? Are there any well known distributions providing nproc and not getconf?
Well, the simplification provided by Rob looks useful to me. It's purely cosmetic, but we also do tons of other cosmetic changes.
True, but for stuff depending on the details of the host OS we need to be careful, so it is interesting to know if this change is NEEDED somewhere, or just a nice-to-have cleanup thing.
Quoted 2 lines
The big question is whether nconf is available even in the really old RHEL distros that some of our users have.
Indeed, this was the kind of details I was missing in the commit description.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 use nproc
In reply to Rob LandleyHello,
Quoted 5 lines · Rob Landley
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?
This patch lacks your Signed-off-by line, so we can't apply it as-is.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com