This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/70611] Compiling binutils with -flto -Wstack-usage fails.
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 01 May 2016 20:34:10 +0000
- Subject: [Bug lto/70611] Compiling binutils with -flto -Wstack-usage fails.
- Auto-submitted: auto-generated
- References: <bug-70611-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70611
--- Comment #4 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> There is no internals of GCC here. Rather the user specified all warnings
> at link time. If the user did not want that then they did not need to
> supply those options ...
That is very user-unfriendly and another reason why people might just
rationally decide that LTO is still not worth the pain.
If I understand correctly, the non-LTO compilation works without warning.
Adding -flto to your CFLAGS should not make your compilation fail in
unexplained ways unless your code is wrong. If LTO is not meant to handle
(some) warnings, then it should disable warnings internally (which would
speed-up compilation). GCC, not the user, should know which warnings work with
LTO and which ones don't, and ignore/disable them.