diff options
author | Phil Blundell <pb@pbcl.net> | 2013-05-02 13:19:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-03 16:19:20 +0100 |
commit | 3dedd8f72c94c375541210e56f5f40ec2a2f8d47 (patch) | |
tree | e514bf09a7b69e9109e52609fae27719d7f4f5c0 | |
parent | a8eca390019b569220d09d9c6d8039cb0898996b (diff) | |
download | poky-3dedd8f72c94c375541210e56f5f40ec2a2f8d47.tar.gz |
gcc-runtime: Avoid error when trying to remove nonexistent directories
If we didn't build libgomp then we won't have installed anything into
${infodir} or ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude. Check
whether those directories exist before trying to remove them, else we
will lose.
(From OE-Core rev: 507e14ecdc5b4ff2ee7f1128d9f30c2948e10d5a)
Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-runtime.inc | 8 |
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 () { | |||
43 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install | 43 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install |
44 | done | 44 | done |
45 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir | 45 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir |
46 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude | 46 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then |
47 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | 47 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude |
48 | fi | ||
49 | if [ -d ${D}${infodir} ]; then | ||
50 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | ||
51 | fi | ||
48 | chown -R root:root ${D} | 52 | chown -R root:root ${D} |
49 | } | 53 | } |
50 | 54 | ||