On Sat, Aug 01, 2020 at 07:02:07PM +0800, Jojo R wrote:
> +insn-generated-split-num = $(shell nproc)

nproc isn't portable, is not the same on every system, and can lead to
a number of processes quadratic in the number of processors being
launched (say, if someone does  make -jK  with K some fraction of the
number of processors).

(It is a bad choice anyway: nproc shows how many hardware threads are
available, not how many it is a good idea to use for optimal
performance; and it can be overridden by the user as well, via an
environment variable).

You need to split to some fixed number of parts, where that fixed number
can depend on the target, but not on the host (or build machine) at all.


Segher

Reply via email to