Index: gcc/opts.cc
--- gcc/opts.cc.orig
+++ gcc/opts.cc
@@ -201,6 +201,9 @@ bool dwarf_based_debuginfo_p ()
   ((strncmp (prefix, string, sizeof prefix - 1) == 0) \
    ? ((string += sizeof prefix - 1), 1) : 0)
 
+int warn_stack_larger_than;
+HOST_WIDE_INT stack_larger_than_size;
+
 void
 set_struct_debug_option (struct gcc_options *opts, location_t loc,
 			 const char *spec)
@@ -655,7 +658,6 @@ static const struct default_options default_options_ta
 #ifdef INSN_SCHEDULING
     { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 },
 #endif
-    { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_fstore_merging, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_ftree_pre, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_ftree_switch_conversion, NULL, 1 },
@@ -696,6 +698,7 @@ static const struct default_options default_options_ta
     { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_fsplit_loops, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_fsplit_paths, NULL, 1 },
+    { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribution, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_ftree_partial_pre, NULL, 1 },
     { OPT_LEVELS_3_PLUS, OPT_funswitch_loops, NULL, 1 },
@@ -1159,6 +1162,8 @@ finish_options (struct gcc_options *opts, struct gcc_o
 	opts->x_flag_pic = 0;
       if (opts->x_flag_pic && !opts->x_flag_pie)
 	opts->x_flag_shlib = 1;
+      if (opts->x_profile_flag)
+        opts->x_flag_pie = 0;
       opts->x_flag_opts_finished = true;
     }
 
@@ -2829,6 +2834,11 @@ common_handle_option (struct gcc_options *opts,
 	opts->x_flag_sanitize_recover
 	  &= ~(SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT);
       break;
+
+    case OPT_Wstack_larger_than_:
+      stack_larger_than_size = value;
+      warn_stack_larger_than = stack_larger_than_size != -1;
+       break;
 
     case OPT_fsanitize_trap:
       if (value)
