]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-runtime: Fix __FILE__ related reproducablity issues
authorKhem Raj <raj.khem@gmail.com>
Wed, 28 Apr 2021 20:14:40 +0000 (13:14 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 May 2021 21:46:42 +0000 (22:46 +0100)
libstdc++ uses assertion macros which use __FILE__ macros and

  if (__builtin_expect(!bool(_Condition), false))                      \
    std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \
                              #_Condition)

This ends up using absolute paths into build tree for the cases where
the charconv header is used, therefore replace the file prefix paths
with on-target paths to make them build dir independent

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-runtime.inc

index 2aca96c408a3093b1e624fbba80451394cf9874b..59d9a24686f5b50e359b9a6cb009ff15837eae0e 100644 (file)
@@ -60,6 +60,7 @@ DEBUG_PREFIX_MAP_class-target = " \
    -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} \
+   -ffile-prefix-map=${B}/${HOST_SYS}/libstdc++-v3/include=${includedir}/c++/${BINV} \
    "
 
 do_configure () {