diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | lib/Kconfig.debug | 11 |
2 files changed, 15 insertions, 0 deletions
@@ -507,6 +507,10 @@ else | |||
507 | KBUILD_CFLAGS += -O2 | 507 | KBUILD_CFLAGS += -O2 |
508 | endif | 508 | endif |
509 | 509 | ||
510 | ifneq (CONFIG_FRAME_WARN,0) | ||
511 | KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) | ||
512 | endif | ||
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 |
512 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) | 516 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 623ef24c2381..754cc0027f2a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -25,6 +25,17 @@ config ENABLE_MUST_CHECK | |||
25 | suppress the "warning: ignoring return value of 'foo', declared with | 25 | suppress the "warning: ignoring return value of 'foo', declared with |
26 | attribute warn_unused_result" messages. | 26 | attribute warn_unused_result" messages. |
27 | 27 | ||
28 | config FRAME_WARN | ||
29 | int "Warn for stack frames larger than (needs gcc 4.4)" | ||
30 | range 0 8192 | ||
31 | default 1024 if !64BIT | ||
32 | default 2048 if 64BIT | ||
33 | help | ||
34 | Tell gcc to warn at build time for stack frames larger than this. | ||
35 | Setting this too low will cause a lot of warnings. | ||
36 | Setting it to 0 disables the warning. | ||
37 | Requires gcc 4.4 | ||
38 | |||
28 | config MAGIC_SYSRQ | 39 | config MAGIC_SYSRQ |
29 | bool "Magic SysRq key" | 40 | bool "Magic SysRq key" |
30 | depends on !UML | 41 | depends on !UML |