Properly detect working jobserver in gcc driver.
authorMartin Liska <mliska@suse.cz>
Fri, 2 Aug 2019 09:23:56 +0000 (11:23 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 2 Aug 2019 09:23:56 +0000 (09:23 +0000)
commite006ead5230560030c44856952967ca0cfea4db2
tree1036c571824eb7e7daa673d13ab75084ac68003c
parentc0cc62604f163289afaa37ba45f729ae31a45e71
Properly detect working jobserver in gcc driver.

2019-08-02  Martin Liska  <mliska@suse.cz>

PR lto/91313
* gcc.c (driver::maybe_run_linker): Call detect_jobserver
to detect working job server.
(driver::detect_jobserver): Test whether jobserver
is active from GCC driver. That will prevent situation where
GCC is invoked from a LD plugin and the linker already uses
file descriptors suggested by make.  That leads to a wrong
detection.
* gcc.h (driver): Add detect_jobserver.
* lto-wrapper.c (jobserver_active_p): Simplify sscanf by
not scanning for --jobserver-auth prefix.

From-SVN: r274003
gcc/ChangeLog
gcc/gcc.c
gcc/gcc.h
gcc/lto-wrapper.c