aboutsummaryrefslogtreecommitdiff
blob: ed996e7df428504b2bb49c862c967abe36577688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- gcc-3.3.6/gcc/toplev.c
+++ gcc-3.3.6/gcc/toplev.c
@@ -904,6 +904,10 @@ int align_functions_log;
    minimum function alignment.  Zero means no alignment is forced.  */
 int force_align_functions_log;
 
+int flag_propolice_protection = 0;
+int flag_stack_protection = 0;
+int warn_stack_protector = 0;
+
 /* Table of supported debugging formats.  */
 static const struct
 {
@@ -1188,6 +1197,10 @@ static const lang_independent_options f_
    N_("Trap for signed overflow in addition / subtraction / multiplication") },
   { "new-ra", &flag_new_regalloc, 1,
    N_("Use graph coloring register allocation.") },
+  {"stack-protector", &flag_propolice_protection, 1,
+   N_("Enables stack protection") },
+  {"stack-protector-all", &flag_stack_protection, 1,
+   N_("Enables stack protection of every function") } ,
 };
 
 /* Table of language-specific options.  */
@@ -1547,7 +1560,9 @@ static const lang_independent_options W_
   {"missing-noreturn", &warn_missing_noreturn, 1,
    N_("Warn about functions which might be candidates for attribute noreturn") },
   {"strict-aliasing", &warn_strict_aliasing, 1,
-   N_ ("Warn about code which might break the strict aliasing rules") }
+   N_ ("Warn about code which might break the strict aliasing rules") },
+  {"stack-protector", &warn_stack_protector, 1,
+   N_("Warn when disabling stack protector for some reason")}
 };
 
 void
@@ -5230,6 +5247,9 @@ process_options ()
     /* The presence of IEEE signaling NaNs, implies all math can trap.  */
     if (flag_signaling_nans)
       flag_trapping_math = 1;
+
+    if (flag_stack_protection || flag_propolice_protection)
+      warning ("ssp stub: stack protector is not supported");
 }
 
 /* Initialize the compiler back end.  */