diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | lib/Kconfig.debug | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -573,8 +573,12 @@ all: vmlinux ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) else +ifdef CONFIG_LESS_GCC_OPT +KBUILD_CLFAGS += -O1 +else KBUILD_CFLAGS += -O2 endif +endif # conserve stack if available # do this early so that an architecture can override it. diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d317c1ad62ab..8c1ea1388644 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -162,6 +162,12 @@ config DEBUG_KERNEL Say Y here if you are developing drivers or trying to debug and identify kernel problems. +config LESS_GCC_OPT + bool "Compile with -O1 for debugging + depends on DEBUG_KERNEL + default y if TEGRA_SIMULATION_PLATFORM + default n if !TEGRA_SIMULATION_PLATFORM + config DEBUG_SHIRQ bool "Debug shared IRQ handlers" depends on DEBUG_KERNEL && GENERIC_HARDIRQS |