blfs tools: fix JOBS

If all cores are used, it should be set to 0, which will use nproc
after the cpuset has been defined, and not nproc (which is the number
of cores/threads on the machine).
This commit is contained in:
Pierre Labastie 2023-11-17 16:10:01 +01:00
parent 04a608ba8e
commit 924076f0b5

View file

@ -136,8 +136,9 @@ STATS=n
SRC_ARCHIVE=/sources
BUILD_ROOT=/sources
BUILD_SUBDIRS=y
JOBS=$(if [ "$ALL_CORES" = y ]; then nproc; else echo $N_PARALLEL; fi)
JOBS=$(if [ "$ALL_CORES" = y ]; then echo 0; else echo $N_PARALLEL; fi)
EOF
# The 0 value above is for using all cores
for OPT_VAR in CFLAGS CXXFLAGS LDFLAGS; do
eval optVal=\$${OPT_VAR}_$DEF_OPT_MODE
if [ -n "$optVal" ] && [ "$optVal" != unset ]; then