13f6a15732
is enabled on in base; except for gcc 3.3, which does not have PIE support and therefore needs to pass -nopie to the linker. Also, sync powerpc pthread specs with base. From Brad. ok naddy@
52 lines
2.1 KiB
Plaintext
52 lines
2.1 KiB
Plaintext
$OpenBSD: patch-gcc_opts_c,v 1.2 2012/09/01 00:00:32 pascal Exp $
|
|
--- gcc/opts.c.orig Thu Feb 17 23:51:57 2011
|
|
+++ gcc/opts.c Wed Aug 29 23:59:07 2012
|
|
@@ -43,6 +43,9 @@ along with GCC; see the file COPYING3. If not see
|
|
((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)
|
|
@@ -477,8 +480,6 @@ static const struct default_options default_options_ta
|
|
{ OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 },
|
|
#endif
|
|
{ OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 },
|
|
- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 },
|
|
- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 },
|
|
{ OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 },
|
|
{ OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 },
|
|
{ OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 },
|
|
@@ -494,6 +495,7 @@ static const struct default_options default_options_ta
|
|
{ OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 },
|
|
|
|
/* -O3 optimizations. */
|
|
+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 },
|
|
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
|
|
{ OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
|
|
/* Inlining of functions reducing size is a good idea with -Os
|
|
@@ -691,6 +693,8 @@ finish_options (struct gcc_options *opts, struct gcc_o
|
|
|
|
if (!opts->x_flag_opts_finished)
|
|
{
|
|
+ if (opts->x_flag_pic || opts->x_profile_flag)
|
|
+ opts->x_flag_pie = 0;
|
|
if (opts->x_flag_pie)
|
|
opts->x_flag_pic = opts->x_flag_pie;
|
|
if (opts->x_flag_pic && !opts->x_flag_pie)
|
|
@@ -1411,6 +1415,11 @@ common_handle_option (struct gcc_options *opts,
|
|
case OPT_Wframe_larger_than_:
|
|
opts->x_frame_larger_than_size = value;
|
|
opts->x_warn_frame_larger_than = value != -1;
|
|
+ break;
|
|
+
|
|
+ case OPT_Wstack_larger_than_:
|
|
+ stack_larger_than_size = value;
|
|
+ warn_stack_larger_than = stack_larger_than_size != -1;
|
|
break;
|
|
|
|
case OPT_Wstrict_aliasing:
|