https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767
--- Comment #40 from Jack Howarth <howarth.at.gcc at gmail dot com> --- (In reply to Jack Howarth from comment #39) > (In reply to Eric Gallager from comment #38) > > Your issue of undefined symbols under FSF gcc is orthogonal to the problem > discussed in this PR. As I mentioned before, the same issue is observed for > a build of stock emacs 25.1 with '-O0 -flto' using a stock (unpatched) gcc > 6.2.0 compiler. You should open a separate PR for that bug. Your bug might be reproducible on linux using a gcc build that doesn't have build_lto_plugin set by configure so the same LTO code path is used as on darwin.