From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/5] bitbake.conf: Handle S and B separately for debug mapping
Date: Sat, 13 Aug 2022 21:35:00 +0100 [thread overview]
Message-ID: <20220813203501.1111519-4-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <20220813203501.1111519-1-richard.purdie@linuxfoundation.org>
We don't really need to keep S and B separate for debug source purposes
and there shouldn't be source references in WORKDIR that isn't S and B
either.
Separating these out simplifies the shared-work directory handling for
gcc and should also help fix external source usage. Therefore handle
S and B in DEBUG_PREFIX_MAP separately and clean up other code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/conf/bitbake.conf | 11 +++++++----
meta/recipes-devtools/gcc/gcc-runtime.inc | 13 -------------
meta/recipes-devtools/gcc/libgcc-common.inc | 8 --------
3 files changed, 7 insertions(+), 25 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index bdfb6784371..dd2df8a5520 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -645,10 +645,13 @@ EXTRA_OEMAKE:prepend:task-install = "${PARALLEL_MAKEINST} "
# Optimization flags.
##################################################################
# Beware: applied last to first
-DEBUG_PREFIX_MAP ?= "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
- -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
- -fdebug-prefix-map=${STAGING_DIR_HOST}= \
- -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+DEBUG_PREFIX_MAP ?= "-fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fdebug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fmacro-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fdebug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+ -fmacro-prefix-map=${STAGING_DIR_HOST}= \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
"
DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 35a3077a4a7..fa5b048dab7 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -50,19 +50,6 @@ RUNTIMETARGET:libc-newlib = "libstdc++-v3"
# libiberty
# libgfortran needs separate recipe due to libquadmath dependency
-# Relative path to be repaced into debug info
-DEBUGSOURCE = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
-
-DEBUG_PREFIX_MAP = " \
- -ffile-prefix-map=${WORKDIR}/${MLPREFIX}recipe-sysroot= \
- -ffile-prefix-map=${WORKDIR}/recipe-sysroot-native= \
- -ffile-prefix-map=${B}=${DEBUGSOURCE} \
- -ffile-prefix-map=${S}=${DEBUGSOURCE} \
- -fdebug-prefix-map=${B}=${DEBUGSOURCE} \
- -fdebug-prefix-map=${S}=${DEBUGSOURCE} \
- -ffile-prefix-map=${B}/${HOST_SYS}/libstdc++-v3/include=${includedir}/c++/${BINV} \
- "
-
do_configure () {
export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib"
# libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index e8139263132..d9084af51ad 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -4,14 +4,6 @@ require gcc-configure-common.inc
INHIBIT_DEFAULT_DEPS = "1"
-DEBUGSOURCE = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
-DEBUG_PREFIX_MAP = " \
- -fdebug-prefix-map=${WORKDIR}/${MLPREFIX}recipe-sysroot= \
- -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
- -fdebug-prefix-map=${B}=${DEBUGSOURCE} \
- -fdebug-prefix-map=${S}=${DEBUGSOURCE} \
- "
-
do_configure () {
install -d ${D}${base_libdir} ${D}${libdir}
mkdir -p ${B}/${BPN}
--
2.34.1
next prev parent reply other threads:[~2022-08-13 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-13 20:34 [PATCH 1/5] gcc: Resolve relative prefix-map filenames Richard Purdie
2022-08-13 20:34 ` [PATCH 2/5] package: Switch debug source handling to use prefix map Richard Purdie
2022-08-13 20:34 ` [PATCH 3/5] libgcc/gcc-runtime: Improve source reference handling Richard Purdie
2022-08-13 20:35 ` Richard Purdie [this message]
2022-08-15 16:37 ` [OE-core] [PATCH 4/5] bitbake.conf: Handle S and B separately for debug mapping Peter Kjellerstedt
2022-08-15 16:56 ` Richard Purdie
2022-08-13 20:35 ` [PATCH 5/5] gcc-cross: Fix relative links Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220813203501.1111519-4-richard.purdie@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox