http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60295

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
lto_wpa_write_files has

for (i = 0; i < n_sets; i++)
{
...
stream_out (temp_filename, part->encoder, i == n_sets - 1);
...
}

n_sets is 32 when bootstrapping GCC.  With parallel build, we
may build cc1, cc1plus, f951, cc1obj at the same time.  If machine
is under heavy load, we may start 4*32 == 128 lto1-wpa-stream
processes at the same time with -flto=jobserver.  This patch:

diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index c676d79..4023036 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -3219,9 +3219,7 @@ do_whole_program_analysis (void)
   lto_parallelism = 1;

   /* TODO: jobserver communicatoin is not supported, yet.  */
-  if (!strcmp (flag_wpa, "jobserver"))
-    lto_parallelism = -1;
-  else
+  if (strcmp (flag_wpa, "jobserver"))
     {
       lto_parallelism = atoi (flag_wpa);
       if (lto_parallelism <= 0)

limits lto1-wpa-stream process to 1 if -flto=jobserver is used.

Reply via email to