summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-runtime.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index a9f77d9b64..977a98a377 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -43,8 +43,12 @@ do_install () {
oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
done
rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
- rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
- rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
+ fi
+ if [ -d ${D}${infodir} ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ fi
chown -R root:root ${D}
}