> Hi. > > I'm suggesting to provide a warning when one uses -flto=jobserver > but we can't detect job server for some reason. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed in next stage1? > Thanks, > Martin > > gcc/ChangeLog: > > 2020-03-26 Martin Liska <mli...@suse.cz> > > PR driver/94330 > * lto-wrapper.c (run_gcc): When using -flto=jobserver, > report warning when the jobserver is not detected. This looks like a good idea to me (though I guess Richi needs to approve it). I would make message more informative so it is clear that jobserver is supposed to be provided by GNU make and that we resort to running in one thread.
Morivation is that prople won't get confused trying to start GCC from other kind of build systems and also when you cut&paste the command out the warning should be explicit enough to make you notice that you can wait for very long time ;) Honza > --- > gcc/lto-wrapper.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > > diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c > index 46a88b233f6..6263c164888 100644 > --- a/gcc/lto-wrapper.c > +++ b/gcc/lto-wrapper.c > @@ -1473,10 +1473,16 @@ run_gcc (unsigned argc, char *argv[]) > auto_parallel = 0; > parallel = 0; > } > - else if (!jobserver && jobserver_active_p ()) > + else > { > - parallel = 1; > - jobserver = 1; > + bool active_jobserver = jobserver_active_p (); > + if (jobserver && !active_jobserver) > + warning (0, "jobserver is not available."); > + else if (!jobserver && active_jobserver) > + { > + parallel = 1; > + jobserver = 1; > + } > } > > if (linker_output) >