$OpenBSD: patch-gcc_toplev_c,v 1.3 2018/04/15 23:39:26 jca Exp $
Index: gcc/toplev.c
--- gcc/toplev.c.orig
+++ gcc/toplev.c
@@ -1041,7 +1041,7 @@ output_stack_usage (void)
 	}
 
       fprintf (stack_usage_file,
-	       "%s:%d:%d:%s\t"HOST_WIDE_INT_PRINT_DEC"\t%s\n",
+	       "%s:%d:%d:%s\t" HOST_WIDE_INT_PRINT_DEC "\t%s\n",
 	       lbasename (loc.file),
 	       loc.line,
 	       loc.column,
@@ -1546,6 +1546,8 @@ process_options (void)
 
   /* Targets must be able to place spill slots at lower addresses.  If the
      target already uses a soft frame pointer, the transition is trivial.  */
+  if (flag_stack_protect == -1)
+    flag_stack_protect = FRAME_GROWS_DOWNWARD ? 3 : 0;
   if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
     {
       warning (0, "-fstack-protector not supported for this target");
