mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-19 11:17:00 +00:00
config: use '0' for automatic number of jobs
Also, make it the default. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
f81519065b
commit
6e00f49ab4
@ -8,15 +8,15 @@ comment "Build options hiden"
|
||||
config PARALLEL_JOBS
|
||||
int
|
||||
prompt "Number of parallel jobs" if ! BACKEND
|
||||
default 1
|
||||
default 0
|
||||
help
|
||||
Number of jobs make will be allowed to run concurently.
|
||||
Set this higher than the number of processors you have, but not too high.
|
||||
A good rule of thumb is twice the number of processors you have.
|
||||
|
||||
Enter 1 (or 0) to have only one job at a time.
|
||||
Enter 1 to have only one job at a time.
|
||||
|
||||
Enter -1 to set automatically based on how many processors the host has.
|
||||
Enter 0 to set automatically based on how many processors the host has.
|
||||
|
||||
config LOAD
|
||||
int
|
||||
|
@ -469,9 +469,6 @@ if [ -z "${CT_RESTART}" ]; then
|
||||
[ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe"
|
||||
CT_CFLAGS_FOR_HOST+="${CT_EXTRA_FLAGS_FOR_HOST}"
|
||||
|
||||
# Override the configured jobs with what's been given on the command line
|
||||
[ -n "${CT_JOBS}" ] && CT_PARALLEL_JOBS="${CT_JOBS}"
|
||||
|
||||
# Set the shell to be used by ./configure scripts and by Makefiles (those
|
||||
# that support it!).
|
||||
export CONFIG_SHELL="${CT_CONFIG_SHELL}" # for ./configure
|
||||
@ -479,10 +476,12 @@ if [ -z "${CT_RESTART}" ]; then
|
||||
|
||||
# And help make go faster
|
||||
JOBSFLAGS=
|
||||
# Override the configured jobs with what's been given on the command line
|
||||
[ -n "${CT_JOBS}" ] && CT_PARALLEL_JOBS="${CT_JOBS}"
|
||||
# Use the number of processors+1 when automatically setting the number of
|
||||
# parallel jobs. Fall back to 1 if the host doesn't use GLIBC.
|
||||
AUTO_JOBS=$((`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 0` + 1))
|
||||
[ ${CT_PARALLEL_JOBS} -eq -1 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}"
|
||||
[ ${CT_PARALLEL_JOBS} -eq 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}"
|
||||
[ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
|
||||
[ ${CT_LOAD} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user