This option allows correctly handle the release/debug flags separation in upper recipe like cmake.
Signed-off-by: Andrej Valek <[email protected]> Signed-off-by: Pascal Bach <[email protected]> Signed-off-by: Adrian Freihofer <[email protected]> --- 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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#144901): https://lists.openembedded.org/g/openembedded-core/message/144901 Mute This Topic: https://lists.openembedded.org/mt/78429702/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
