public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pexu@gcc-bugzilla.mail.kapsi.fi" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/98275] New: -flto=auto fails if nthreads_var is zero, must not pass -j0
Date: Mon, 14 Dec 2020 13:55:32 +0000 [thread overview]
Message-ID: <bug-98275-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98275
Bug ID: 98275
Summary: -flto=auto fails if nthreads_var is zero, must not
pass -j0
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: pexu@gcc-bugzilla.mail.kapsi.fi
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Host: mingw64
Hi.
When using `-flto=auto' if the number of threads is not detected, i.e.
`nthreads_var' equals to zero, lto-wrapper must not pass -j0 to GNU make as -j
expects a positive, non-zero integer (if any given).
>From GNU make manual: ``If the ‘-j’ option is followed by an integer, this is
the number of recipes to execute at once; this is called the number of job
slots. If there is nothing looking like an integer after the ‘-j’ option, there
is no limit on the number of job slots.''.
gcc/lto-wrapper.c:
2001 snprintf (jobs, 31, "-j%ld",
2002 auto_parallel ? nthreads_var : parallel);
$ make -j0
make: the '-j' option requires a positive integer argument
Tried GNU make 4.2.1 (2016 vintage) and 4.2.93 (2020). For the latest trunk
argument parsing happens at src/main.c around line 2961 [1]; It basically does
``int i = atoi(arg); if (i < 1 || not-all-chars-are-digits) { handle-bad-arg
}''.
[1] https://git.savannah.gnu.org/cgit/make.git/tree/src/main.c#n2961
next reply other threads:[~2020-12-14 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 13:55 pexu@gcc-bugzilla.mail.kapsi.fi [this message]
2020-12-14 16:15 ` [Bug lto/98275] " marxin at gcc dot gnu.org
2020-12-15 9:07 ` cvs-commit at gcc dot gnu.org
2020-12-15 9:10 ` marxin at gcc dot gnu.org
2020-12-15 10:12 ` pexu@gcc-bugzilla.mail.kapsi.fi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-98275-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).