diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2015-11-03 00:35:30 -0800 |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2015-11-03 00:35:30 -0800 |
commit | 5ffc9ecd10dec73024f8e7f3815c7b2f0851ba56 (patch) | |
tree | 010f2c18d1137b7a1f35370c1aca82573090bc09 /scripts | |
parent | 8c87c3d7195c3cd43253ab73745216dddb8bec3c (diff) | |
parent | f849505ac94a3f616fc3af243f50be42409335ca (diff) | |
download | crosstool-ng-5ffc9ecd10dec73024f8e7f3815c7b2f0851ba56.tar.gz crosstool-ng-5ffc9ecd10dec73024f8e7f3815c7b2f0851ba56.tar.bz2 crosstool-ng-5ffc9ecd10dec73024f8e7f3815c7b2f0851ba56.zip |
Merge pull request #235 from stilor/ctng-source
ctng source
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/crosstool-NG.sh.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index ab654da7..a3514cb9 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -516,7 +516,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}" + if [ -n "${CT_JOBS}" ]; then + if [ ! -z "`echo "${CT_JOBS}" | sed 's/[0-9]//g'`" ]; then + CT_Abort "Number of parallel jobs must be integer." + fi + CT_PARALLEL_JOBS="${CT_JOBS}" + fi # 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)) @@ -524,6 +529,9 @@ if [ -z "${CT_RESTART}" ]; then [ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}" JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}" + # Override 'download only' option + [ -n "${CT_SOURCE}" ] && CT_ONLY_DOWNLOAD=y + # Now that we've set up $PATH and $CT_CFLAGS_FOR_HOST, sanity test that gcc # is runnable so that the user can troubleshoot problems if not. CT_DoStep DEBUG "Checking that we can run gcc -v" |