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" ? > 2018-01-22 Richard Biener <rguent...@suse.de> > > maintainer-scripts/ > * gcc_release (build_sources): Pass -m "-j1" to gcc_build. > > Index: maintainer-scripts/gcc_release > =================================================================== > --- maintainer-scripts/gcc_release (revision 256939) > +++ maintainer-scripts/gcc_release (working copy) > @@ -210,7 +210,8 @@ EOF > inform "Building compiler" > OBJECT_DIRECTORY=../objdir > contrib/gcc_build -d ${SOURCE_DIRECTORY} -o ${OBJECT_DIRECTORY} \ > - -c "--enable-generated-files-in-srcdir --disable-multilib" build || \ > + -c "--enable-generated-files-in-srcdir --disable-multilib" \ > + -m "-j1" build || \ > error "Could not rebuild GCC" > fi > Jakub