From cab1b0ebc00ea53040afcbe4b91e653a87915092 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 15 Dec 2020 09:59:04 +0100 Subject: [PATCH] lto: set nthreads_var to 1 if it is zero gcc/ChangeLog: PR lto/98275 * lto-wrapper.c: Do not use -j0 when we are unable to detect number of cores. --- gcc/lto-wrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 68ccb156521..da1305c1696 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -1780,6 +1780,8 @@ cont1: { char buf[256]; init_num_threads (); + if (nthreads_var == 0) + nthreads_var = 1; if (verbose) fprintf (stderr, "LTO parallelism level set to %ld\n", nthreads_var); -- 2.30.2