summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-04-14 18:13:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-16 18:15:13 +0100
commit998391b818f78d1479667efb203b29a304c985cf (patch)
tree611f43511cfda7c0640a0a1c6f7a2e4a2735161a
parent96016c1d30e425707f6a2901a26a91afd33de0a2 (diff)
downloadopenembedded-core-998391b818f78d1479667efb203b29a304c985cf.tar.gz
openembedded-core-998391b818f78d1479667efb203b29a304c985cf.tar.bz2
openembedded-core-998391b818f78d1479667efb203b29a304c985cf.zip
gcc-runtime: Make DEBUG_PREFIX_MAP relative to S
Current definition of SLIB is actually equal to S but is hardcoded, this means when we have altered location of S, then the regexp for DEBUG_PREFIX_MAP will not be effective, which could result in S being emitted into debug_line sections. Simplify the maps to use S variable instead of SLIB Secondly, rename SLIB_NEW to REL_S to make it more appropritate to what it represents Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 9dcce26536..2aca96c408 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -49,16 +49,17 @@ RUNTIMETARGET_libc-newlib = "libstdc++-v3"
# libiberty
# libgfortran needs separate recipe due to libquadmath dependency
-SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+# Relative path to be repaced into debug info
+REL_S = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
DEBUG_PREFIX_MAP_class-target = " \
-fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
-fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
- -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
- -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
- -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
- -fdebug-prefix-map=${B}=${SLIB_NEW} \
+ -fdebug-prefix-map=${S}=${REL_S} \
+ -fdebug-prefix-map=${S}/include=${REL_S}/libstdc++-v3/../include \
+ -fdebug-prefix-map=${S}/libiberty=${REL_S}/libstdc++-v3/../libiberty \
+ -fdebug-prefix-map=${S}/libgcc=${REL_S}/libstdc++-v3/../libgcc \
+ -fdebug-prefix-map=${B}=${REL_S} \
"
do_configure () {