https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115211
Bug ID: 115211 Summary: [11/12/13/14/15 regression] -frecord-gcc-switches refactoring lost list of enabled options Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- When investigating PR libstdc++/111641, I had the need to determine if -funwind-tables is enabled by default on various targets. Previously, this could be done as easily as assembling an empty file with -dA -fverbose-asm and looking for the "options enabled" comment in there (or, as I recently learned, by just adding -Q -v to the compile command). To my dismay, I found that this facility has been removed since GCC 11 by this commit: commit 7caa49706316e650fb67719e1a1bf3a35054b685 Author: Martin Liska <mli...@suse.cz> Date: Mon Nov 23 13:40:04 2020 +0100 Refactor -frecord-gcc-switches. -[fg]record-gcc-switches is no replacement since it only includes the options explicitly passed on the command line, not the enabled ones. I know of no replacement at all for this facitlity, and digging through the mazes of option handling in toplev.cc, opts.cc, target option handling code is a totally losing proposition. Martin argued in https://gcc.gnu.org/pipermail/gcc-patches/2020-November/560358.html that the support in GCC 10 were incomplete, but any support is better than nothing at all. Going back to GCC 10 may sort of work for a while, but over time the divergence will become so great that the result is useless.