[OE-core] [PATCH 1/3] bitbake.conf: Prune global OPTIMIZATION flags

Khem Raj raj.khem at gmail.com
Mon Mar 21 18:11:25 UTC 2011


-fexpensive-optimizations is enabled by default at -O2

-fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon
  architecture if debug info is not hurt

-frename-registers - This might have some performance advantage on top
 of O2 on architectures which have more registers and registers are left
 after scheduling but it affects debuggability quite a bit so as a i
 tradeoff we do not use it.

-feliminate-dwarf2-dups - We use this option to reduce the size of debug
 information by removing duplicates this is only valid for dwarf2+ and we
 use dwarf2 by default

-pipe uses buffers instead of temporary files internally it can speed
 up compilation it has has issues with other assemblers but not
 with GNU assembler and we use gas.

Separate out debug information related flags into a separate variable
DEBUG_FLAGS so distros can use/notuse them as they like

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta/conf/bitbake.conf |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d5f1fc5..52e66a5 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -495,11 +495,11 @@ EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
 ##################################################################
 # Optimization flags.
 ##################################################################
-
-FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types"
-DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
+DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types -feliminate-dwarf2-dups"
+FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
+DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
 SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
-BUILD_OPTIMIZATION = "-O2"
+BUILD_OPTIMIZATION = "-O2 -pipe"
 
 ##################################################################
 # Bootstrap stuff.
-- 
1.7.4.1





More information about the Openembedded-core mailing list