1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

bitbake.conf: Further cleanup compiler optimization flags

Move the -pipe option out of the optimization flags and directly into
the flags variables since we always use it now.

Also move the debug prefix mapping there to match the nativesdk case
which already does this.

Fix the documentation and two recipe usages to match the change.

(From OE-Core rev: 9badf68d78d995f7d5d4cf27e045f029fc6d4044)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-07-12 07:35:48 +01:00
parent 3891414b6b
commit 1cf0974ad2
6 changed files with 16 additions and 16 deletions
+8 -7
View File
@@ -610,10 +610,10 @@ BUILDSDK_CPPFLAGS = ""
export CPPFLAGS = "${TARGET_CPPFLAGS}"
TARGET_CPPFLAGS = ""
export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION} -pipe"
BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION} ${DEBUG_PREFIX_MAP} -pipe"
export CFLAGS = "${TARGET_CFLAGS}"
TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP} -pipe"
export BUILD_CXXFLAGS = "${BUILD_CFLAGS}"
BUILDSDK_CXXFLAGS = "${BUILDSDK_CFLAGS}"
@@ -663,13 +663,14 @@ DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \
-fmacro-prefix-map=${STAGING_DIR_HOST}= \
-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
"
DEBUG_FLAGS ?= "-g ${DEBUG_PREFIX_MAP}"
DEBUG_LEVELFLAG ?= "-g"
FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
DEBUG_OPTIMIZATION = "-Og ${DEBUG_FLAGS} -pipe"
FULL_OPTIMIZATION = "-O2 ${DEBUG_LEVELFLAG}"
DEBUG_OPTIMIZATION = "-Og ${DEBUG_LEVELFLAG}"
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', '-O2', d)} -pipe"
# compiler flags for native/nativesdk
BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g', '-O2', d)}"
BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
##################################################################