diff options
author | Richard Biener <rguenther@suse.de> | 2018-01-25 10:22:38 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-01-25 10:22:38 +0000 |
commit | 8819c9199a6f6d4ad4a3eb83eef6e91122482c33 (patch) | |
tree | 4827803a9adaa9715a216d10ffba1aae34aa4ec9 /maintainer-scripts | |
parent | b254c1a2322532451b419c8ce850ab7347f51469 (diff) | |
download | gcc-8819c9199a6f6d4ad4a3eb83eef6e91122482c33.zip gcc-8819c9199a6f6d4ad4a3eb83eef6e91122482c33.tar.gz gcc-8819c9199a6f6d4ad4a3eb83eef6e91122482c33.tar.bz2 |
gcc_release (build_sources): Use getconf to get at the number of cores in the system and pass -jN to gcc_build.
2018-01-25 Richard Biener <rguenther@suse.de>
* gcc_release (build_sources): Use getconf to get at the number
of cores in the system and pass -jN to gcc_build.
From-SVN: r257045
Diffstat (limited to 'maintainer-scripts')
-rw-r--r-- | maintainer-scripts/ChangeLog | 5 | ||||
-rwxr-xr-x | maintainer-scripts/gcc_release | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 1ab5363..abe22d8 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,8 @@ +2018-01-25 Richard Biener <rguenther@suse.de> + + * gcc_release (build_sources): Use getconf to get at the number + of cores in the system and pass -jN to gcc_build. + 2017-10-10 Jakub Jelinek <jakub@redhat.com> * update_version_svn: Ignore the GCC 5 branch. diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index c8a398f..e784554 100755 --- a/maintainer-scripts/gcc_release +++ b/maintainer-scripts/gcc_release @@ -209,8 +209,16 @@ EOF # on at least one platform. inform "Building compiler" OBJECT_DIRECTORY=../objdir + 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 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 "-j$num_cpus" build || \ error "Could not rebuild GCC" fi |