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-Tag: basepoints/gcc-12~2217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cab1b0ebc00ea53040afcbe4b91e653a87915092;p=thirdparty%2Fgcc.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 68ccb1565219..da1305c16965 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);