1 From 311dfd4e74dabfc23bc08f8825776a1ff430ebbe Mon Sep 17 00:00:00 2001
2 From: Andy Fiddaman <omnios@citrus-it.co.uk>
3 Date: Thu, 25 Oct 2018 18:19:36 +0000
4 Subject: [PATCH 12/34] We never want to omit the frame pointer, regardless of
5 the optimisation level or options to gcc - we like stack traces too much and
6 it is of questionable benefit anyway, even on i386.
9 gcc/config/i386/i386-options.c | 9 +++++++++
11 2 files changed, 11 insertions(+), 1 deletion(-)
13 diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c
14 index 6f05496841b..8605ef21dbc 100644
15 --- a/gcc/config/i386/i386-options.c
16 +++ b/gcc/config/i386/i386-options.c
17 @@ -2904,6 +2904,15 @@ ix86_option_override_internal (bool main_args_p,
22 + * We never want to omit the frame pointer, regardless of the optimisation
23 + * level or options to gcc - we like stack traces too much and it is of
24 + * questionable benefit anyway, even on i386.
27 + flag_omit_frame_pointer = 0;
28 + opts->x_flag_omit_frame_pointer = 0;
30 /* Save the initial options in case the user does function specific
33 diff --git a/gcc/opts.c b/gcc/opts.c
34 index 73162528938..5e0ea01a0a1 100644
37 @@ -439,7 +439,7 @@ static const struct default_options default_options_table[] =
38 { OPT_LEVELS_1_PLUS, OPT_fipa_reference, NULL, 1 },
39 { OPT_LEVELS_1_PLUS, OPT_fipa_reference_addressable, NULL, 1 },
40 { OPT_LEVELS_1_PLUS, OPT_fmerge_constants, NULL, 1 },
41 - { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
42 + { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 0 },
43 { OPT_LEVELS_1_PLUS, OPT_freorder_blocks, NULL, 1 },
44 { OPT_LEVELS_1_PLUS, OPT_fshrink_wrap, NULL, 1 },
45 { OPT_LEVELS_1_PLUS, OPT_fsplit_wide_types, NULL, 1 },
46 @@ -471,6 +471,7 @@ static const struct default_options default_options_table[] =
47 { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_ftree_pta, NULL, 1 },
48 { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_ftree_sra, NULL, 1 },
51 /* -O2 and -Os optimizations. */
52 { OPT_LEVELS_2_PLUS, OPT_fcaller_saves, NULL, 1 },
53 { OPT_LEVELS_2_PLUS, OPT_fcode_hoisting, NULL, 1 },