From a50964d036333a9bbd91b6ba439778fbe06859f1 Mon Sep 17 00:00:00 2001 From: Richard Wiley Date: Tue, 7 Aug 2012 10:42:51 -0700 Subject: kernel: add Kbuild option for kernel optimization level Adds a kernel config option to lower the kernel compile optimization level from O2 to O1 for clearer GDB debugging. Default on for simulation builds, default off for others. Change-Id: I17fd63b5b391984d28b275e516df89d6a223021c Reviewed-on: http://git-master/r/121822 Reviewed-by: Chao Xu Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ken Adams Tested-by: Richard Wiley Reviewed-by: Mark Stadler Reviewed-by: Bo Yan Rebase-Id: Ra7c14ac91b0cfbe441dbfea33f0d5b1a6fd44d5f --- lib/Kconfig.debug | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3