Hi Christophe. Thanks for the review; that was quick. :)
> Thanks for your interest and efforts. You deserve some contributions/freebies, with all the hard work you're already doing - thank you on behalf of thousands of people using your toolchain! >> * By default use twice as many cores for -jN as usual. (If you have >> 2 cores, use -j4) >> -CPUS="`grep -c proces /proc/cpuinfo`" >> + >> +let CPUS=2*`getconf _NPROCESSORS_ONLN` > > Using getconf is indeed more portable, I think. > However, I'm not sure we want the '2*' part of the patch, > since we sort-of rely on the -j factor in our validations > (e.g. number of independent builds in parallel on a > given machine) Fair enough. :) -If you use the CPUS variable for the actual number of cores, then you could do like I do in my builds instead: let CPUS=`getconf _NPROCESSORS_ONLN` let cpucount=2*$CPUS pmake="make -j$cpucount"; [ -w "$prefix" ] && smake="$pmake" || smake="sudo $pmake" case `uname -s` in 'Darwin') isMac=1; smake="sudo $pmake" ;; 'Linux') isLinux=1 ;; esac -I mentioned this in the support request as well. I'm creating two variables, which contains the code used for executing make. It has a 'built-in' -jN, where N is twice the number of cores. -But if you're somehow querying make for the -j argument, then you'll probably need to use $CPUS directly. (Normally -j2 will use around 50% CPU-time on a dual core machine - this is most likely due to the disk access involved, where the CPU waits for the disk to deliver data and sleeps until the data arrives). Love Jens _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-toolchain