$OpenBSD: patch-gcc_common_opt,v 1.3 2015/01/08 20:23:21 pascal Exp $

Add stack protector strong support.

http://repo.or.cz/w/official-gcc.git/commit/b156ec373ccf27f4fcce7972de5e043d35acea43

--- gcc/common.opt.orig	Fri Jun 13 18:39:37 2014
+++ gcc/common.opt	Mon Jan  5 22:42:05 2015
@@ -572,6 +572,10 @@ Wlarger-than=
 Common RejectNegative Joined UInteger Warning
 -Wlarger-than=<number>	Warn if an object is larger than <number> bytes
 
+Wstack-larger-than-
+Common RejectNegative Joined UInteger
+-Wstack-larger-than-<number> Warn if a function is using more than <number> bytes of stack space for its local variables.
+
 Wunsafe-loop-optimizations
 Common Var(warn_unsafe_loop_optimizations) Warning
 Warn if the loop cannot be optimized due to nontrivial assumptions.
@@ -636,7 +640,7 @@ Common Var(warn_suggest_attribute_noreturn) Warning
 Warn about functions which might be candidates for __attribute__((noreturn))
 
 Wsystem-headers
-Common Var(warn_system_headers) Warning
+Common Var(warn_system_headers) Init(1) Warning
 Do not suppress warnings from system headers
 
 Wtrampolines
@@ -691,6 +695,10 @@ Wunused-variable
 Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
 Warn when a variable is unused
 
+Wvariable-decl
+Common Var(warn_variable_decl)
+Warn about variable-sized declarations
+
 Wcoverage-mismatch
 Common Var(warn_coverage_mismatch) Init(1) Warning
 Warn in case profiles in -fprofile-use do not match
@@ -798,7 +806,7 @@ fabi-version=
 Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
 
 faggressive-loop-optimizations
-Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1) 
+Common Report Var(flag_aggressive_loop_optimizations) Optimization
 Aggressively optimize loops using language constraints
 
 falign-functions
@@ -995,7 +1003,7 @@ Common Report Var(flag_delete_dead_exceptions) Init(0)
 Delete dead instructions that may throw exceptions
 
 fdelete-null-pointer-checks
-Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization
+Common Report Var(flag_delete_null_pointer_checks)
 Delete useless null pointer checks
 
 fdevirtualize
@@ -1251,7 +1259,7 @@ Enable guessing of branch probabilities
 ; On SVR4 targets, it also controls whether or not to emit a
 ; string identifying the compiler.
 fident
-Common Report Var(flag_no_ident,0)
+Common Report Var(flag_no_ident,0) Init(1)
 Process #ident directives
 
 fif-conversion
@@ -1603,7 +1611,7 @@ Common Report Var(flag_pic,2) Negative(fPIE)
 Generate position-independent code if possible (large mode)
 
 fPIE
-Common Report Var(flag_pie,2) Negative(fpic)
+Common Report Var(flag_pie,2) Negative(fpic) Init(PIE_DEFAULT)
 Generate position-independent code for executables if possible (large mode)
 
 fpic
@@ -1906,13 +1914,17 @@ Common RejectNegative Joined Var(common_deferred_optio
 -fstack-limit-symbol=<name>	Trap if the stack goes past symbol <name>
 
 fstack-protector
-Common Report Var(flag_stack_protect, 1)
+Common Report Var(flag_stack_protect, 3) Init(-1)
 Use propolice as a stack protection method
 
 fstack-protector-all
 Common Report RejectNegative Var(flag_stack_protect, 2)
 Use a stack protection method for every function
 
+fstack-protector-strong
+Common Report RejectNegative Var(flag_stack_protect, 3)
+Use a smart stack protection method for certain functions
+
 fstack-usage
 Common RejectNegative Var(flag_stack_usage)
 Output stack usage information on a per-function basis
@@ -2311,7 +2323,7 @@ Common JoinedOrMissing Negative(gdwarf-)
 Generate debug information in COFF format
 
 gdwarf-
-Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
+Common Joined UInteger Var(dwarf_version) Init(2) Negative(gstabs)
 Generate debug information in DWARF v2 (or later) format
 
 ggdb
@@ -2395,6 +2407,9 @@ no-canonical-prefixes
 Driver
 
 nodefaultlibs
+Driver
+
+nopie
 Driver
 
 nostartfiles
