summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAchille Fouilleul <achille.fouilleul@gadz.org>2018-10-05 16:38:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-09 19:04:02 +0100
commit8b6109901aaa2b36541ca12c605febcd0d0e25dd (patch)
tree38324ba932f562918da18588813db04aeccfe8fa /meta
parent74ea4f280c19bc7901e2d13960ad81165dedd01d (diff)
downloadpoky-8b6109901aaa2b36541ca12c605febcd0d0e25dd.tar.gz
binutils: fix symlinks
For nativesdk, symlinks created by do_install contain ${SDKPATHNATIVE}. This is a problem with SDKs that include nativesdk-binutils and nativesdk-gcc. When extracting such an SDK dangling symlinks are created, because relocate_sdk.py does not adjust symlinks. As a result gcc ends up calling the host binutils. Use the os.path.relpath function to obtain shorter relative paths, which do not contain ${SDKPATHNATIVE}. (From OE-Core rev: 3d6372aa2d9f752eac0e4943d1bde04f0f1924a0) Signed-off-by: Achille Fouilleul <achille.fouilleul@gadz.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 81ecbb50cc..0fb6cae407 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -131,12 +131,12 @@ do_install () {
131 # We don't really need these, so we'll remove them... 131 # We don't really need these, so we'll remove them...
132 rm -rf ${D}${libdir}/ldscripts 132 rm -rf ${D}${libdir}/ldscripts
133 133
134 bindir_rel=${@os.path.relpath('${bindir}', '${prefix}/${TARGET_SYS}/bin')}
135
134 # Fix the /usr/${TARGET_SYS}/bin/* links 136 # Fix the /usr/${TARGET_SYS}/bin/* links
135 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do 137 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
136 rm -f $l 138 rm -f $l
137 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ 139 ln -sf $bindir_rel/${TARGET_PREFIX}`basename $l` $l
138 | tr -s / \
139 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
140 done 140 done
141 141
142 # Install the libiberty header 142 # Install the libiberty header