summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-20 13:28:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-23 12:10:32 +0100
commit0484f61152b4f629c8049694a101499b6bd3a2ca (patch)
tree33ccef2c64e43cd316b79cca91b496aa16b18adc
parentbdccd18d1f8b7810934d700dfbb184729665d712 (diff)
downloadopenembedded-core-contrib-0484f61152b4f629c8049694a101499b6bd3a2ca.tar.gz
bitbake.conf: Handle S and B separately for debug mapping
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>
-rw-r--r--meta/conf/bitbake.conf11
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc13
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc8
3 files changed, 7 insertions, 25 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1d36aae8b3..a6da3be342 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 ad04b77c04..b63280ab3a 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -49,19 +49,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 d0138017e1..148c9f85a7 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}