From: Matt Mackall <mpm@selenic.com>

Quick fix to work around gcc3.5's automatic inline and broken stack
requirements calculation. Without this, I see stack overflows at boot
with 4k stacks.


---

 25-akpm/lib/inflate.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff -puN lib/inflate.c~gcc-35-stack-use-fix lib/inflate.c
--- 25/lib/inflate.c~gcc-35-stack-use-fix	2004-03-21 00:00:57.558909768 -0800
+++ 25-akpm/lib/inflate.c	2004-03-21 00:00:57.560909464 -0800
@@ -685,8 +685,10 @@ DEBG("<stor");
 }
 
 
-
-STATIC int inflate_fixed(void)
+/*
+ * We use `noinline' here to prevent gcc-3.5 from using too much stack space
+ */
+STATIC int noinline inflate_fixed(void)
 /* decompress an inflated type 1 (fixed Huffman codes) block.  We should
    either replace this with a custom decoder, or at least precompute the
    Huffman tables. */
@@ -739,8 +741,10 @@ DEBG("<fix");
 }
 
 
-
-STATIC int inflate_dynamic(void)
+/*
+ * We use `noinline' here to prevent gcc-3.5 from using too much stack space
+ */
+STATIC int noinline inflate_dynamic(void)
 /* decompress an inflated type 2 (dynamic Huffman codes) block. */
 {
   int i;                /* temporary variables */

_