diff --git a/[refs] b/[refs] index 7978c34dbd75..c806e8810486 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80ff26241623875636674a31c0540a78c0fb5433 +refs/heads/master: 35bb5b1e0e84cfa1a8906f7e6a77f391ff315791 diff --git a/trunk/Makefile b/trunk/Makefile index 6ae7fd4475b8..c6d331ba140b 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -507,6 +507,10 @@ else KBUILD_CFLAGS += -O2 endif +ifneq (CONFIG_FRAME_WARN,0) +KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) +endif + # Force gcc to behave correct even for buggy distributions # Arch Makefiles may override this setting KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) diff --git a/trunk/lib/Kconfig.debug b/trunk/lib/Kconfig.debug index 623ef24c2381..754cc0027f2a 100644 --- a/trunk/lib/Kconfig.debug +++ b/trunk/lib/Kconfig.debug @@ -25,6 +25,17 @@ config ENABLE_MUST_CHECK suppress the "warning: ignoring return value of 'foo', declared with attribute warn_unused_result" messages. +config FRAME_WARN + int "Warn for stack frames larger than (needs gcc 4.4)" + range 0 8192 + default 1024 if !64BIT + default 2048 if 64BIT + help + Tell gcc to warn at build time for stack frames larger than this. + Setting this too low will cause a lot of warnings. + Setting it to 0 disables the warning. + Requires gcc 4.4 + config MAGIC_SYSRQ bool "Magic SysRq key" depends on !UML