]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-sanitizers: check gcc-build-internal before link
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 3 Feb 2015 06:43:26 +0000 (22:43 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Feb 2015 22:26:09 +0000 (22:26 +0000)
The ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget may not exist
when use the external sdk toolchain, we need check before link for it.

Fixed:
run.do_configure.12538: 149: cd: can't cd to sysroots/x86_64-linux/usr/include/gcc-build-internal-x86_64-wrs-linux

(LOCAL REV: NOT UPSTREAM) -- Sent to oe-core on 20150204

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-devtools/gcc/gcc-sanitizers.inc

index 35c9247cc101bb1d2c65bd8de2312ae00c2434b8..c987ccb5895d910e90323fb82af2a86ba187798b 100644 (file)
@@ -14,7 +14,9 @@ EXTRA_OECONF_PATHS = "\
 do_configure () {
     mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
     target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
-    hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
+    if [ -d ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ]; then
+        hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
+    fi
 
     echo "Configuring libsanitizer"
     rm -rf ${B}/$target/libsanitizer/