On 01/22/2018 01:57 AM, Jakub Jelinek wrote:
> On Mon, Jan 22, 2018 at 09:37:05AM +0100, Richard Biener wrote:
>>
>> Currently gcc_release builds GCC (for generating in-tree generated
>> files) serially - that's prohibitly expensive and takges ages (>4h for 
>> me).  I'm using (when I remember to edit gcc_release ...) -j6 without
>> a problem for some years, thus the following proposal.
>>
>> Any recommendation for the default N?  4 might work just fine as well
>> and no release manager should do without at least 4 cores...
> 
> Perhaps
> num_cpus=1
> if type -p getconf 2>/dev/null; then
>   num_cpus=`getconf _NPROCESSORS_ONLN 2>/dev/null`
>   case "$num_cpus" in
>     '' | 0* | *[!0-9]*) num_cpus=1;;
>   esac
> fi
> 
> and "-j$num_cpus" ?
Seems reasonable to me -- I believe we do something similar on our
various internal scripts ({redhat,fedora}-rpm-config).

jeff

Reply via email to