]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
Config.in: add -Og option
authorMartin Kelly <martin@surround.io>
Wed, 18 May 2016 21:17:55 +0000 (14:17 -0700)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 24 May 2016 21:17:52 +0000 (23:17 +0200)
-Og (introduced in GCC 4.8) lets you optimize for debugging experience,
which can be useful for when you want optimized code that is nonetheless
debuggable.

Signed-off-by: Martin Kelly <martin@surround.io>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Config.in
package/Makefile.in

index b8e5d18a6156cf0000e1adc382a2389171466555..4b48c009709e9cd3cae6598011a13deeb11189f4 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -512,6 +512,16 @@ config BR2_OPTIMIZE_3
          and also turns on the -finline-functions, -funswitch-loops and
          -fgcse-after-reload options.
 
+config BR2_OPTIMIZE_G
+       bool "optimize for debugging"
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+       help
+         Optimize for debugging. This 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.
+
 config BR2_OPTIMIZE_S
        bool "optimize for size"
        help
index 616bdd056b3b34060e44cfd286c25c38a4d68ada..2d454a63820ba8c778caad8a63d557736e5060b0 100644 (file)
@@ -122,6 +122,9 @@ endif
 ifeq ($(BR2_OPTIMIZE_3),y)
 TARGET_OPTIMIZATION = -O3
 endif
+ifeq ($(BR2_OPTIMIZE_G),y)
+TARGET_OPTIMIZATION = -Og
+endif
 ifeq ($(BR2_OPTIMIZE_S),y)
 TARGET_OPTIMIZATION = -Os
 endif