summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-03-14 09:13:21 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-14 13:17:41 (GMT)
commitd6426b63a3bf3c8d8f40c5dd17389a530fac0f5c (patch)
tree0137725c70b9e9b64d2186d1260cf641c8ea5961 /meta/recipes-devtools/gcc
parent089767f71e59d9031f51ee5c2b5a133a1ff53ae6 (diff)
downloadpoky-d6426b63a3bf3c8d8f40c5dd17389a530fac0f5c.tar.gz
gcc-cross: aviod creating invalid symlinks
There are several invalid symlinks in gcc-cross-initial, gcc-cross-intermediate and gcc-cross, these cause the error:(56 errors) tmp/work/i586-poky-linux/gcc-cross-initial-4.6.3+svnr184847-r23/temp/log.do_populate_sysroot: log.do_populate_sysroot:grep: /path/to/invalid/symlink: No such file or directory Avoid creating invalid symlinks would fix this problem. Use the: [ ! -e file ] || do_something But not use: [ -e file ] && do_something is because that if the "file" doesn't exist, then the whole statement would return false, and bitbake treats this an error, so use the "||" to let it always be true. [YOCTO #2095] (From OE-Core rev: 7893e74311e53882d8f93ecb95a6bd9f5b14651e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-intermediate.inc3
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-cross.inc6
2 files changed, 6 insertions, 3 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
index ea105e6..87d11ab 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -51,7 +51,8 @@ do_install () {
51 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ 51 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
52 install -d $dest 52 install -d $dest
53 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do 53 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
54 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t 54 [ ! -e ${BINRELPATH}/${TARGET_PREFIX}$t ] || \
55 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
55 done 56 done
56} 57}
57 58
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
index e32412c..3d52d23 100644
--- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -19,8 +19,10 @@ do_install () {
19 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ 19 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
20 install -d $dest 20 install -d $dest
21 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do 21 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
22 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t 22 if [ -e ${BINRELPATH}/${TARGET_PREFIX}$t ]; then
23 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t 23 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
24 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
25 fi
24 done 26 done
25 27
26 # Remove things we don't need but keep share/java 28 # Remove things we don't need but keep share/java