Don't activate -funit-at-a-time with -O2 and higher by default, when
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / patches / opts.c.patch
1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/opts.c.patch,v 1.5 2005/05/13 17:40:44 joerg Exp $
2
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/opts.c,v
5 retrieving revision 1.1
6 diff -u -r1.1 opts.c
7 --- opts.c      20 Jun 2004 02:14:50 -0000      1.1
8 +++ opts.c      22 Mar 2005 23:54:25 -0000
9 @@ -125,6 +125,9 @@
10  bool warn_unused_variable;
11  bool warn_unused_value;
12  
13 +/* Warn when not issuing stack smashing protection for some reason */
14 +bool warn_stack_protector;
15 +
16  /* Hack for cooperation between set_Wunused and set_Wextra.  */
17  static bool maybe_warn_unused_parameter;
18  
19 @@ -142,6 +145,12 @@
20     write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG.  */
21  bool use_gnu_debug_info_extensions;
22  
23 +/* The default visibility for all symbols (unless overridden) */
24 +enum symbol_visibility default_visibility = VISIBILITY_DEFAULT;
25 +
26 +/* Global visibility options.  */
27 +struct visibility_flags visibility_options;
28 +
29  /* Columns of --help display.  */
30  static unsigned int columns = 80;
31  
32 @@ -560,11 +560,11 @@
33        flag_schedule_insns_after_reload = 1;
34  #endif
35        flag_regmove = 1;
36 -      flag_strict_aliasing = 1;
37        flag_delete_null_pointer_checks = 1;
38        flag_reorder_blocks = 1;
39        flag_reorder_functions = 1;
40 -      flag_unit_at_a_time = 1;
41 +      if (!flag_propolice_protection)
42 +        flag_unit_at_a_time = 1;
43      }
44  
45    if (optimize >= 3)
46 @@ -798,6 +806,10 @@
47        warn_unused_variable = value;
48        break;
49  
50 +    case OPT_Wstack_protector:
51 +      warn_stack_protector = value;
52 +      break;
53 +
54      case OPT_aux_info:
55      case OPT_aux_info_:
56        aux_info_file_name = arg;
57 @@ -1361,6 +1373,14 @@
58        stack_limit_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (arg));
59        break;
60  
61 +    case OPT_fstack_protector:
62 +      flag_propolice_protection = value;
63 +      break;
64 +
65 +    case OPT_fstack_protector_all:
66 +      flag_stack_protection = value;
67 +      break;
68 +
69      case OPT_fstrength_reduce:
70        flag_strength_reduce = value;
71        break;
72 @@ -1440,6 +1460,21 @@
73        flag_verbose_asm = value;
74        break;
75  
76 +    case OPT_fvisibility_:
77 +      {
78 +        if(!strcmp(arg, "default"))
79 +          default_visibility=VISIBILITY_DEFAULT;
80 +        else if(!strcmp(arg, "internal"))
81 +          default_visibility=VISIBILITY_INTERNAL;
82 +        else if(!strcmp(arg, "hidden"))
83 +          default_visibility=VISIBILITY_HIDDEN;
84 +        else if(!strcmp(arg, "protected"))
85 +          default_visibility=VISIBILITY_PROTECTED;
86 +        else
87 +          error("unrecognised visibility value \"%s\"", arg);
88 +      }
89 +      break;
90 +
91      case OPT_fweb:
92        flag_web = value;
93        break;