https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128552
Bug ID: 128552
Summary: [Enhancement] Add an option to dump the final,
effective specs after all includes and merges
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: dragon-archer at outlook dot com
Target Milestone: ---
Currently, if $prefix/lib/gcc/<triplet>/<ver>/specs exists, GCC will
automatically load it, and it may load more specs files by %include or
%include_noerr. This is used in Conda to inject hard-coded -rpath.
However, -dumpspecs will always show builtin specs, even if it's overridden by
implicitly loaded $prefix/lib/gcc/<triplet>/<ver>/specs.
Considering that some users may expect -dumpspecs to remain unchanged, I
propose adding a new option (e.g. -dumpspecs-effective), that dumps the final
merged specs. It might be better if it can also be used together with -specs=,
not only the implicitly loaded specs.