summaryrefslogtreecommitdiffstats
path: root/meta/conf/bitbake.conf
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2023-11-16 23:48:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-20 15:30:52 +0000
commit0904c4c34a106e42ea0c758c2f7f04355e1e7905 (patch)
tree5067f3acb26056cc4308fd4e56fdf3ac33e9acfe /meta/conf/bitbake.conf
parent0769e8ef6b52584ef790744fe43973e56789e2b2 (diff)
downloadpoky-0904c4c34a106e42ea0c758c2f7f04355e1e7905.tar.gz
bitbake.conf: drop ${PE} and ${PR} from -f{file,macro,debug}-prefix-map
* ${EXTENDPE} and ${PR} was already dropped from ${WORKDIR} in: https://lists.openembedded.org/g/openembedded-core/message/185818 adjust -fmacro-prefix-map and -fdebug-prefix-map similarly. As we don't depend on PR in WORKDIR maybe we don't need it in /usr/src/debug paths as well anymore. * add TARGET_DBGSRC_DIR variable with "/usr/src/debug/${PN}/${PV}" because there is quite a few places where this location is being used in various recipes * The interesting side-effect of this is that for DISTROs which still use PR (e.g. webOS OSE), the difference in -fdebug-prefix-map causes all binaries to be slightly different when rebuilt with different PR (due to this path, even when otherwise they are binary reproducible) and when the number of digits in PR changes (e.g. from r9 to r10) it also results in slightly bigger binaries (and more unnecessary changes in buildhistory diffs). For example this foo binary, the difference between "new" and "old" is extra patch applied in SRC_URI (which doesn't affect the foo binary, but was the reason for PR bump). And the binary is bigger with r10, identical with r6 and slightly different due to debug-prefix-map between r6 and r7: $ ls -la 1.0.0-175-*/image/usr/sbin/foo -rwxr-xr-x 1 bitbake bitbake 30182460 Nov 8 08:29 1.0.0-175-new-r10/image/usr/sbin/foo -rwxr-xr-x 1 bitbake bitbake 30182224 Nov 8 08:02 1.0.0-175-new-r6/image/usr/sbin/foo -rwxr-xr-x 1 bitbake bitbake 30182224 Nov 8 07:49 1.0.0-175-new-r7/image/usr/sbin/foo -rwxr-xr-x 1 bitbake bitbake 30182224 Nov 8 07:39 1.0.0-175-old-r6/image/usr/sbin/foo $ md5sum 1.0.0-175-*/image/usr/sbin/foo 8e3ab67d596f8cc2f9c6320dab10af01 1.0.0-175-new-r10/image/usr/sbin/foo f6ff1e64fe6affb9ba0d8f278cf7ed79 1.0.0-175-new-r6/image/usr/sbin/foo 6469a0b10aac233911e63c5ea97b03c0 1.0.0-175-new-r7/image/usr/sbin/foo f6ff1e64fe6affb9ba0d8f278cf7ed79 1.0.0-175-old-r6/image/usr/sbin/foo (From OE-Core rev: c84c8ba295eeaa0e0b7592364b0978f17a44c70b) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r--meta/conf/bitbake.conf9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 8d04b71de3..5bb007d62c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -645,12 +645,13 @@ EXTRA_OEMAKE:prepend:task-install = "${PARALLEL_MAKEINST} "
645################################################################## 645##################################################################
646# Optimization flags. 646# Optimization flags.
647################################################################## 647##################################################################
648TARGET_DBGSRC_DIR ?= "/usr/src/debug/${PN}/${PV}"
648# Beware: applied last to first 649# Beware: applied last to first
649DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \ 650DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \
650 -fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ 651 -fmacro-prefix-map=${S}=${TARGET_DBGSRC_DIR} \
651 -fdebug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ 652 -fdebug-prefix-map=${S}=${TARGET_DBGSRC_DIR} \
652 -fmacro-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ 653 -fmacro-prefix-map=${B}=${TARGET_DBGSRC_DIR} \
653 -fdebug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ 654 -fdebug-prefix-map=${B}=${TARGET_DBGSRC_DIR} \
654 -fdebug-prefix-map=${STAGING_DIR_HOST}= \ 655 -fdebug-prefix-map=${STAGING_DIR_HOST}= \
655 -fmacro-prefix-map=${STAGING_DIR_HOST}= \ 656 -fmacro-prefix-map=${STAGING_DIR_HOST}= \
656 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ 657 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \