From d3c294ee0afe4d2eb46320945d41064ebfb5cbff Mon Sep 17 00:00:00 2001 From: Sana Kazi Date: Fri, 14 Mar 2025 14:57:55 +0530 Subject: [PATCH] gcc-cross-canadian.inc: Fix buildpaths error for pthread.h Replace the hardcoded path with /not/exist as used for other options[--with-sysroot] to ensure pthread.h does not contain hardocded references to TMPDIR: ERROR: gcc-cross-canadian-x86-64-13.3.0-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/ usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/13.3.0/include-fixed/ pthread.h in package gcc-cross-canadian-x86-64 contains reference to TMPDIR [buildpaths] Signed-off-by: Sana Kazi Signed-off-by: Steve Sakoman --- meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index adcaef2b0f8..06f0cef8646 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc @@ -118,6 +118,11 @@ do_install () { # We don't care about the gcc- copies rm -f ${D}${bindir}/*gcc-${BINV}* + # Remove buildpaths from pthread.h + sed -i -e "s|${RECIPE_SYSROOT_NATIVE}|/not/exist|g" \ + -e "s|${RECIPE_SYSROOT}|/not/exist|g" \ + ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed/pthread.h + # Cleanup empty directories which are not shipped # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686 -- 2.47.3