diff options
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 7d2b8ff..6f48e10 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1605,6 +1605,26 @@ process_options (void) flag_associative_math = 0; } + /* -fstack-clash-protection is not currently supported on targets + where the stack grows up. */ + if (flag_stack_clash_protection && !STACK_GROWS_DOWNWARD) + { + warning_at (UNKNOWN_LOCATION, 0, + "%<-fstack-clash-protection%> is not supported on targets " + "where the stack grows from lower to higher addresses"); + flag_stack_clash_protection = 0; + } + + /* We can not support -fstack-check= and -fstack-clash-protection at + the same time. */ + if (flag_stack_check != NO_STACK_CHECK && flag_stack_clash_protection) + { + warning_at (UNKNOWN_LOCATION, 0, + "%<-fstack-check=%> and %<-fstack-clash_protection%> are " + "mutually exclusive. Disabling %<-fstack-check=%>"); + flag_stack_check = NO_STACK_CHECK; + } + /* With -fcx-limited-range, we do cheap and quick complex arithmetic. */ if (flag_cx_limited_range) flag_complex_method = 0; |