aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2008-02-22 09:15:03 -0500
committerSam Ravnborg <sam@uranus.ravnborg.org>2008-04-25 14:23:47 -0400
commit35bb5b1e0e84cfa1a8906f7e6a77f391ff315791 (patch)
treefd3fa4e426bd11df3496141d8a251a783bce5f8d /Makefile
parent80ff26241623875636674a31c0540a78c0fb5433 (diff)
Add option to enable -Wframe-larger-than= on gcc 4.4
Add option to enable -Wframe-larger-than= on gcc 4.4 gcc mainline (upcoming 4.4) added a new -Wframe-larger-than=... option to warn at build time about too large stack frames. Add a config option to enable this warning, since this very useful for the kernel. I choose (somewhat arbitarily) 2048 as default warning threshold for 64bit and 1024 as default for 32bit architectures. With some research and fixing all the code for smaller values these defaults should be probably lowered. With the default allyesconfigs have some new warnings, but I think that is all code that should be just fixed. At some point (when gcc 4.4 is released and widely used) this should obsolete make checkstack Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6ae7fd4475b8..c6d331ba140b 100644
--- a/Makefile
+++ b/Makefile
@@ -507,6 +507,10 @@ else
507KBUILD_CFLAGS += -O2 507KBUILD_CFLAGS += -O2
508endif 508endif
509 509
510ifneq (CONFIG_FRAME_WARN,0)
511KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
512endif
513
510# Force gcc to behave correct even for buggy distributions 514# Force gcc to behave correct even for buggy distributions
511# Arch Makefiles may override this setting 515# Arch Makefiles may override this setting
512KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) 516KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)