summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2018-01-04 12:24:01 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-05 11:54:57 +0000
commit04748af752b7f9d79ee4add67141d6c891f3bdbe (patch)
tree4ce20889958012e60e3f3dcbd9f4632b4e30e745
parente21723bb9b6035714268eeab5f43e2d1cb798a0d (diff)
downloadopenembedded-core-04748af752b7f9d79ee4add67141d6c891f3bdbe.tar.gz
gcc-runtime: improve reproducibility
Remove various build host references from packages: libstdc++ libstdc++-staticdev gcc-runtime-dbg The references are removoved by correctly setting various compiler -fdebug-prefix-map settings. There are two main issues: The default DEBUG_PREFIX_MAP variable references WORKDIR, however, gcc sources are in a shared folder (work-shared)/ Additionally, DWARF info seems to store symlink names but gcc seems to resolve symlink names referenced in -fdebug-prefix-map. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3d4bd36a8..7629fa56ff 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -34,6 +34,18 @@ RUNTIMETARGET_remove_libc-musl = "libmpx"
# libmudflap
# 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}"
+
+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} \
+ "
+
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
for d in libgcc ${RUNTIMETARGET}; do