$OpenBSD: patch-gcc_config_sparc_sparc_c,v 1.2 2017/07/19 09:23:16 pascal Exp $
Index: gcc/config/sparc/sparc.c
--- gcc/config/sparc/sparc.c.orig
+++ gcc/config/sparc/sparc.c
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "varasm.h"
 #include "output.h"
 #include "insn-attr.h"
+#include "flags.h"
 #include "explow.h"
 #include "expr.h"
 #include "debug.h"
@@ -5609,6 +5610,9 @@ sparc_expand_prologue (void)
   /* Load the GOT register if needed.  */
   if (crtl->uses_pic_offset_table)
     load_got_register ();
+
+  if (warn_stack_larger_than && size > stack_larger_than_size)
+    warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", size);
 
   /* Advertise that the data calculated just above are now valid.  */
   sparc_prologue_data_valid_p = true;
