Makefile.inc: Use -Og when compiling with GDB support
From GCC's documentation: 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: I9a3dadbf8e894cb28e29d7b2f4e9add252e7bbb3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-on: http://review.coreboot.org/8689 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
@@ -259,7 +259,7 @@ CFLAGS_common += -Werror
|
||||
endif
|
||||
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
|
||||
ifneq ($(GDB_DEBUG),)
|
||||
CFLAGS_common += -O0
|
||||
CFLAGS_common += -Og
|
||||
else
|
||||
CFLAGS_common += -Os
|
||||
endif
|
||||
|
Reference in New Issue
Block a user