https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93751
--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > Hence I think we both agree that space-conscious applications are the > primary consumers of -g1. It is just that in our case, we are also faced > with the extreme bloat of -g2 but we need -g1 to do what it is currently > described in the manual - just the function descriptions are not sufficient > for us. > > So I propose to introduce a new option, e.g. `-gdwarf-external-variables` > that will make GCC generate the DIEs for external variables. In other words: > > * `-g1` will keep the current behavior > * `-g1 -gdwarf-external-variables` will do what the manual currently > describes, which is also what we need > > Would that be acceptable? Sure. People might even be OK to retrofit -gdwarf-external-variables into -g1 if the size increase is limited and -gno-dwarf-external-variables is available.