* [PATCH] lto: no sub-make when --jobserver-auth= is missing
@ 2020-10-26 18:20 Martin Liška
2020-10-27 7:25 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2020-10-26 18:20 UTC (permalink / raw)
To: gcc-patches
We newly correctly detect that a job server is not active for
a LTO linking:
lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS'
In that situation we should not call make -f abc.mk as it can leed
to N^2 LTRANS units.
Ready for master?
Thanks,
Martin
gcc/ChangeLog:
* lto-wrapper.c (run_gcc): Do not use sub-make when jobserver is
not detected properly.
---
gcc/lto-wrapper.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index b2af3caa021..fe10f4f4fbb 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1582,7 +1582,11 @@ run_gcc (unsigned argc, char *argv[])
{
const char *jobserver_error = jobserver_active_p ();
if (jobserver && jobserver_error != NULL)
- warning (0, jobserver_error);
+ {
+ warning (0, jobserver_error);
+ parallel = 0;
+ jobserver = 0;
+ }
else if (!jobserver && jobserver_error == NULL)
{
parallel = 1;
--
2.29.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] lto: no sub-make when --jobserver-auth= is missing
2020-10-26 18:20 [PATCH] lto: no sub-make when --jobserver-auth= is missing Martin Liška
@ 2020-10-27 7:25 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2020-10-27 7:25 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
On Mon, Oct 26, 2020 at 7:21 PM Martin Liška <mliska@suse.cz> wrote:
>
> We newly correctly detect that a job server is not active for
> a LTO linking:
>
> lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS'
>
> In that situation we should not call make -f abc.mk as it can leed
> to N^2 LTRANS units.
>
> Ready for master?
OK.
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> * lto-wrapper.c (run_gcc): Do not use sub-make when jobserver is
> not detected properly.
> ---
> gcc/lto-wrapper.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
> index b2af3caa021..fe10f4f4fbb 100644
> --- a/gcc/lto-wrapper.c
> +++ b/gcc/lto-wrapper.c
> @@ -1582,7 +1582,11 @@ run_gcc (unsigned argc, char *argv[])
> {
> const char *jobserver_error = jobserver_active_p ();
> if (jobserver && jobserver_error != NULL)
> - warning (0, jobserver_error);
> + {
> + warning (0, jobserver_error);
> + parallel = 0;
> + jobserver = 0;
> + }
> else if (!jobserver && jobserver_error == NULL)
> {
> parallel = 1;
> --
> 2.29.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-27 7:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 18:20 [PATCH] lto: no sub-make when --jobserver-auth= is missing Martin Liška
2020-10-27 7:25 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).