| Submitter | Joseph S. Myers |
|---|---|
| Date | Sept. 30, 2010, 5:36 p.m. |
| Message ID | <Pine.LNX.4.64.1009301729450.2375@digraph.polyomino.org.uk> |
| Download | mbox | patch |
| Permalink | /patch/66185/ |
| State | New |
| Headers | show |
Comments
> The following is a minimal fix to define these variables for Ada. It at > least allows Ada-enabled stage 1 to build; OK to commit? (Ada doesn't OK, thanks. > 2010-09-30 Joseph Myers <joseph@codesourcery.com> > > * gcc-interface/misc.c (optimize, optimize_size): Undefine as > macros and define as variables. > (gnat_post_options): Set optimize and optimize_size variables.
Patch
Index: gcc-interface/misc.c =================================================================== --- gcc-interface/misc.c (revision 164751) +++ gcc-interface/misc.c (working copy) @@ -303,6 +303,13 @@ gnat_init_options (unsigned int decoded_ flag_zero_initialized_in_bss = 0; } +/* Ada code requires variables for these settings rather than elements + of the global_options structure. */ +#undef optimize +#undef optimize_size +int optimize; +int optimize_size; + /* Post-switch processing. */ static bool @@ -334,6 +341,9 @@ gnat_post_options (const char **pfilenam if (write_symbols == DWARF2_DEBUG) use_gnu_debug_info_extensions = gnat_dwarf_extensions > 0; + optimize = global_options.x_optimize; + optimize_size = global_options.x_optimize_size; + return false; }