Add support for external spec file via the GNAT_SPECS env var. This allows us to easily control compiler spec defaults. Original patch for gcc by Rob Holland. Extended to support multiple entries separated by ':' and adjusted for gnat builds by Kevin F. Quinn --- gnat-3/gcc/gcc.c.orig 2005-12-04 18:38:28.000000000 +0100 +++ gnat-3/gcc/gcc.c 2005-12-04 18:44:33.000000000 +0100 @@ -6482,6 +6482,30 @@ /* Process any user specified specs in the order given on the command line. */ + /* Add specs listed in GNAT_SPECS. Note; in the process of separating + * each spec listed, the string is overwritten at token boundaries + * with '\0', an effect of strtok_r(). + */ + GET_ENVIRONMENT (specs_file, "GNAT_SPECS"); + if (specs_file && (strlen(specs_file) > 0)) + { + char *spec, *saveptr; + for (spec=strtok_r(specs_file,":",&saveptr); + spec!=NULL; + spec=strtok_r(NULL,":",&saveptr)) + { + struct user_specs *user = (struct user_specs *) + xmalloc (sizeof (struct user_specs)); + + user->next = (struct user_specs *) 0; + user->filename = spec; + if (user_specs_tail) + user_specs_tail->next = user; + else + user_specs_head = user; + user_specs_tail = user; + } + } for (uptr = user_specs_head; uptr; uptr = uptr->next) { char *filename = find_a_file (&startfile_prefixes, uptr->filename,