build: use -Og instead of -O0 for CONFIG_DEBUG

From the GCC manual for -Og option, introduced in GCC
4.8:

Optimize debugging experience. -Og enables optimizations
that do not interfere with debugging. It should be the
optimization level of choice for the standard
edit-compile-debug cycle, offering a reasonable level of
optimization while maintaining fast compilation and a
good debugging experience

Change-Id: I65751cf3117bc2e6f70a7008b170126160cfa48c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-07-22 12:15:40 -07:00
parent e6a34f8175
commit 11693c1bf9
1 changed files with 1 additions and 1 deletions

View File

@ -600,7 +600,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
endif
ifeq ($(CONFIG_DEBUG),y)
KBUILD_CFLAGS += -O0
KBUILD_CFLAGS += -Og
else
KBUILD_CFLAGS += -Os
endif