1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/toplev.c.patch,v 1.3 2004/12/21 13:10:48 joerg Exp $
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/toplev.c,v
5 retrieving revision 1.2
7 --- toplev.c 20 Dec 2004 19:23:24 -0000 1.2
8 +++ toplev.c 20 Dec 2004 20:48:13 -0000
10 declarations for e.g. AIX 4.x. */
13 +#ifdef STACK_PROTECTOR
14 +#include "protector.h"
17 #ifndef HAVE_conditional_execution
18 #define HAVE_conditional_execution 0
21 minimum function alignment. Zero means no alignment is forced. */
22 int force_align_functions_log;
24 +#if defined(STACK_PROTECTOR) && defined(STACK_GROWS_DOWNWARD)
25 +/* Nonzero means use propolice as a stack protection method */
26 +int flag_propolice_protection = 1;
27 +int flag_stack_protection = 0;
29 +int flag_propolice_protection = 0;
30 +int flag_stack_protection = 0;
35 const char *const string;
37 {"mem-report", &mem_report, 1 },
38 { "trapv", &flag_trapv, 1 },
39 { "wrapv", &flag_wrapv, 1 },
40 - { "new-ra", &flag_new_regalloc, 1 }
41 + { "new-ra", &flag_new_regalloc, 1 },
42 + {"stack-protector", &flag_propolice_protection, 1 },
43 + {"stack-protector-all", &flag_stack_protection, 1 }
46 /* Here is a table, controlled by the tm.h file, listing each -m switch
51 + if (flag_propolice_protection)
52 + prepare_stack_protection (inlinable);
54 /* Dump the rtl code if we are dumping rtl. */
56 if (open_dump_file (DFI_rtl, decl))
57 @@ -4483,6 +4501,12 @@
58 /* The presence of IEEE signaling NaNs, implies all math can trap. */
59 if (flag_signaling_nans)
60 flag_trapping_math = 1;
62 + /* This combination makes optimized frame addressings and causes
63 + a internal compilation error at prepare_stack_protection.
64 + so don't allow it. */
65 + if (flag_stack_protection && !flag_propolice_protection)
66 + flag_propolice_protection = TRUE;
69 /* Initialize the compiler back end. */