public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core][PATCH 1/2] bitbake.conf: Split optimization into common part
@ 2020-11-22 12:48 Andrej Valek
  2020-11-22 12:48 ` [OE-core][PATCH 2/2] cmake: split release and debug flags Andrej Valek
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Andrej Valek @ 2020-11-22 12:48 UTC (permalink / raw)
  To: openembedded-core; +Cc: Andrej Valek, Pascal Bach, Adrian Freihofer

This option allows correctly handle the release/debug flags separation in
upper recipe like cmake.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/conf/bitbake.conf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 0d38eac094..5555093e24 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -569,7 +569,7 @@ TARGET_CPPFLAGS = ""
 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
 BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
 export CFLAGS = "${TARGET_CFLAGS}"
-TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
+TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION} ${COMMON_OPTIMIZATION}"
 
 export BUILD_CXXFLAGS = "${BUILD_CFLAGS}"
 BUILDSDK_CXXFLAGS = "${BUILDSDK_CFLAGS}"
@@ -616,8 +616,9 @@ DEBUG_PREFIX_MAP ?= "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTEND
 DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
 
 # Disabled until the option works properly -feliminate-dwarf2-dups
-FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
-DEBUG_OPTIMIZATION = "-Og ${DEBUG_FLAGS} -pipe"
+COMMON_OPTIMIZATION = "${DEBUG_FLAGS} -pipe"
+FULL_OPTIMIZATION = "-O2"
+DEBUG_OPTIMIZATION = "-Og"
 SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
 SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
 BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g -feliminate-unused-debug-types', '-O2', d)} -pipe"
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-11-25 16:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-22 12:48 [OE-core][PATCH 1/2] bitbake.conf: Split optimization into common part Andrej Valek
2020-11-22 12:48 ` [OE-core][PATCH 2/2] cmake: split release and debug flags Andrej Valek
2020-11-23 15:03   ` Khem Raj
2020-11-23 19:00 ` [OE-core][PATCH v2 1/2] bitbake.conf: Split optimization into common part Andrej Valek
2020-11-23 19:17   ` Richard Purdie
2020-11-24  8:01     ` Andrej Valek
2020-11-24 13:34       ` Richard Purdie
2020-11-24 18:47         ` Andrej Valek
2020-11-24 19:29   ` Khem Raj
2020-11-25 10:30   ` Richard Purdie
2020-11-25 16:58     ` Andrej Valek
2020-11-23 19:00 ` [OE-core][PATCH v2 2/2] cmake: split release and debug flags Andrej Valek
2020-11-24 19:32   ` Khem Raj
2020-11-25 10:23     ` Andrej Valek
2020-11-25 15:45       ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox