diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/gcc/gcc/common.opt | 2 | ||||
-rw-r--r-- | gnu/gcc/gcc/toplev.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/common.opt b/gnu/gcc/gcc/common.opt index d0991d244f9..57f7ed1a713 100644 --- a/gnu/gcc/gcc/common.opt +++ b/gnu/gcc/gcc/common.opt @@ -863,7 +863,7 @@ Common RejectNegative Joined -fstack-limit-symbol=<name> Trap if the stack goes past symbol <name> fstack-protector -Common Report Var(flag_stack_protect, 1) Init(1) +Common Report Var(flag_stack_protect, 1) Init(-1) Use propolice as a stack protection method fstack-protector-all diff --git a/gnu/gcc/gcc/toplev.c b/gnu/gcc/gcc/toplev.c index 53fcdfe580c..5d438e0de27 100644 --- a/gnu/gcc/gcc/toplev.c +++ b/gnu/gcc/gcc/toplev.c @@ -1833,6 +1833,8 @@ process_options (void) /* Targets must be able to place spill slots at lower addresses. If the target already uses a soft frame pointer, the transition is trivial. */ + if (flag_stack_protect == -1) + flag_stack_protect = FRAME_GROWS_DOWNWARD ? 1 : 0; if (!FRAME_GROWS_DOWNWARD && flag_stack_protect) { warning (0, "-fstack-protector not supported for this target"); |