https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109263
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- So we stream -g in .lto_options and we do have early LTO debug. But then nothing combines -g0 -ggdb in the driver so lto-wrapper also sees -g0 and thinks that will prevail, setting skip_debug to true. Unfortunately -ggdb isn't just -g with "gdb" as arg but an entirely separate option. Interestingly -gno-dwarf enables debug info as well.