Skip to content

Commit

Permalink
Add -fforce-omit-frame-pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Nov 26, 2022
1 parent cb0509a commit 5fe0e17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions gcc/common.opt
Original file line number Diff line number Diff line change
Expand Up @@ -2191,6 +2191,10 @@ fomit-frame-pointer
Common Var(flag_omit_frame_pointer) Optimization
When possible do not generate stack frames.

fforce-omit-frame-pointer
Common Var(flag_force_omit_frame_pointer) Optimization
When possible, do not generate stack frames. Hinders debugging with mdb and dtrace.

fopt-info
Common Var(flag_opt_info) Optimization
Enable all optimization info dumps on stderr.
Expand Down
7 changes: 5 additions & 2 deletions gcc/config/i386/i386-options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2922,8 +2922,11 @@ ix86_option_override_internal (bool main_args_p,
* questionable benefit anyway, even on i386.
*/

flag_omit_frame_pointer = 0;
opts->x_flag_omit_frame_pointer = 0;
if (flag_force_omit_frame_pointer == 0)
{
flag_omit_frame_pointer = 0;
opts->x_flag_omit_frame_pointer = 0;
}

/* Save the initial options in case the user does function specific
options. */
Expand Down

0 comments on commit 5fe0e17

Please sign in to comment.