From 789e0a776f923336e4d6b5f6cd845157cd0b0ad8 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Thu, 30 Sep 2010 17:44:28 +0000 Subject: [PATCH] * gcc-interface/misc.c (optimize, optimize_size): Undefine as macros and define as variables. (gnat_post_options): Set optimize and optimize_size variables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164755 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/misc.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 52be3a9..36389f4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2010-09-30 Joseph Myers + + * gcc-interface/misc.c (optimize, optimize_size): Undefine as + macros and define as variables. + (gnat_post_options): Set optimize and optimize_size variables. + 2010-09-28 Joel Sherrill * g-socket.adb: Move pragma to disable warnings in case diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 1819977..a991fba 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -303,6 +303,13 @@ gnat_init_options (unsigned int decoded_options_count, 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 **pfilename ATTRIBUTE_UNUSED) 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; } -- 2.7.4