https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105568
Bug ID: 105568 Summary: Superfluous --jobserver-auth= check taints further diagnostics Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: p...@gcc-bugzilla.mail.kapsi.fi Target Milestone: --- Hi. When linking with -flto=jobserver both gcc/gcc.cc and gcc/lto-wrapper.cc check if MAKEFLAGS contains "--jobserver-auth=" and if so attempt to further scrutinize its contents. Unfortunately, detect_jobserver() (at gcc/gcc.cc), which is executed always when linking, silently removes the entire "--jobserver-auth=" (up until next space) shall this scrutinization attempt fail. This makes jobserver_active_p() (at gcc/lto-wrapper.cc) always complain about a missing "--jobserver-auth=". Indeed, this might be now technically true, but it is very confusing and misleading if this was done because detect_jobserver() was not satisfied with the given "--jobserver-auth=". There a many reasons why the given "--jobserver-auth=" might be treated as non-functioning. Either GNU make is using an another jobserver type (named semaphore), the given file descriptors are inaccessible because GNU make and GCC are using different emulation layers (e.g. Mingw and Cygwin) or those simply are indeed not inherited, i.e. user forgot to add `+' to invoking GNU rule. Therefore it might be still necessary to remove the "--jobserver-auth=" but I presume this should done after jobserver_active_p(). Actually, this is already being done, as the entire MAKEFLAGS is emptied unless jobserver logic is enabled.