[Bug c/96407] LTO inlined functions don't inherit disabled warnings

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96407

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug c/96407] LTO inlined functions don't inherit disabled warnings

2020-08-01 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96407

Jeffrey A. Law  changed:

   What|Removed |Added

   Last reconfirmed||2020-08-01
   Assignee|unassigned at gcc dot gnu.org  |law at redhat dot com
 CC||law at redhat dot com
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

[Bug c/96407] LTO inlined functions don't inherit disabled warnings

2020-08-01 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96407

Mark Wielaard  changed:

   What|Removed |Added

 CC||mark at gcc dot gnu.org

--- Comment #1 from Mark Wielaard  ---
Same for using -Wstack-usage= on the command line. It is one of the workarounds
needed for building elfutils with LTO enabled:
https://sourceware.org/pipermail/elfutils-devel/2020q2/002733.html

This version of elfutils handles debuginfo generated with GCC LTO
better and it can finally be build with GCC LTO itself:

  export AR=gcc-ar RANLIB=gcc-ranlib NM=gcc-nm
  ./configure CFLAGS="-O2 -g -flto=auto -flto-partition=none \
  -Wno-error=stack-usage=" \
CXXFLAGS="-O2 -g -flto=auto -flto-partition=none"

Note the two workaround. -flto-partition=none is needed to preserve the
symbol versioning. -Wno-error=stack-usage= is needed because LTO will
combine objects build with and without a -Wstack-usage limit.