diff options
-rw-r--r-- | Kconfig | 6 | ||||
-rw-r--r-- | Makefile | 4 |
2 files changed, 10 insertions, 0 deletions
@@ -90,6 +90,12 @@ config CC_OPTIMIZE_FOR_SPEED Enabling this option will pass "-O2" to gcc, resulting in a faster U-Boot image. +config CC_OPTIMIZE_FOR_DEBUG + bool "Optimize for debugging" + help + Enabling this option will pass "-Og" to gcc, enabling optimizations + which don't interfere with debugging. + endchoice config OPTIMIZE_INLINING @@ -689,6 +689,10 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_SPEED KBUILD_CFLAGS += -O2 endif +ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG +KBUILD_CFLAGS += -Og +endif + LTO_CFLAGS := LTO_FINAL_LDFLAGS := export LTO_CFLAGS LTO_FINAL_LDFLAGS |