Denis Chertykov schrieb: > 2011/10/10 Georg-Johann Lay <a...@gjlay.de>: >> toplev.c complains about "unwind tables currently require a frame pointer for >> correctness". >> >> This patchlet supplies a fix to avoid build warnings/test fails in that it >> sets >> flag_omit_frame_pointer to 0 if unwind needs FP. >> >> toplev.c:process_options sets flag_unwind_tables depending on >> flag_non_call_exceptions and flag_asynchronous_unwind_tables after calling >> targetm.target_option.override() so that the test includes these flags, too. >> >> Ok? >> >> Johann >> >> * config/avr/avr.c (avr_option_override): Set >> flag_omit_frame_pointer to 0 if frame pointer is needed for >> unwinding. >> > > Approved. > > Denis.
flag_omit_frame_pointer must not be overridden if there is no need for doing so, thus I canceled the else because otherwise -fno-omit-frame-pointer will have no effect. flag_omit_frame_pointer is already set up fine in avr_option_optimization_table. Committed as obvious. http://gcc.gnu.org/viewcvs?view=revision&revision=179994 Johann Fix thinko from r179765 * config/avr/avr.c (avr_option_override): Don't override flag_omit_frame_pointer if not actually needed. Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 179993) +++ config/avr/avr.c (working copy) @@ -372,10 +372,6 @@ avr_option_override (void) { flag_omit_frame_pointer = 0; } - else - { - flag_omit_frame_pointer = (optimize >= 1); - } avr_current_device = &avr_mcu_types[avr_mcu_index]; avr_current_arch = &avr_arch_types[avr_current_device->arch];