From: Martin Liska Date: Tue, 15 Dec 2020 08:59:04 +0000 (+0100) Subject: lto: set nthreads_var to 1 if it is zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cab1b0ebc00ea53040afcbe4b91e653a87915092;p=gcc.git 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. --- 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);