After automatically discovered "specs" file is loaded, or in its absence "built-in" specs are generated; attempt to discover "specs.overlay" and load it.
Unlike "specs", "specs.overlay" allows using "%include", "%include_noerr" and "%rename" commands, similar to user provided `-specs` on the command line. Then continue to parse and load any user provided `-specs` on the command line. gcc/ChangeLog: * gcc.cc (driver::set_up_specs): Parse and load specs.overlay by default, with all commands allowed. Signed-off-by: Dimitri John Ledkov <dimitri.led...@surgut.co.uk> --- gcc/gcc.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/gcc.cc b/gcc/gcc.cc index 16fed46fb35..b00d93b45c4 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -8601,6 +8601,11 @@ driver::set_up_specs () const PREFIX_PRIORITY_LAST, 0, 1); } + /* Process any built-in specs overlay, allow include_noerr */ + specs_file = find_a_file (&startfile_prefixes, "specs.overlay", R_OK, true); + if (specs_file != 0 && access (specs_file, R_OK) == 0) + read_specs (specs_file, false, false); + /* Process any user specified specs in the order given on the command line. */ for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next) -- 2.43.0