[oe-commits] [openembedded-core] 06/18: binutils: fix symlinks
git at git.openembedded.org
git at git.openembedded.org
Tue Oct 9 18:02:19 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 3d6372aa2d9f752eac0e4943d1bde04f0f1924a0
Author: Achille Fouilleul <achille.fouilleul at gadz.org>
AuthorDate: Fri Oct 5 16:38:08 2018 +0200
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}.
Signed-off-by: Achille Fouilleul <achille.fouilleul at gadz.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-devtools/binutils/binutils.inc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 81ecbb5..0fb6cae 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -131,12 +131,12 @@ do_install () {
# We don't really need these, so we'll remove them...
rm -rf ${D}${libdir}/ldscripts
+ bindir_rel=${@os.path.relpath('${bindir}', '${prefix}/${TARGET_SYS}/bin')}
+
# Fix the /usr/${TARGET_SYS}/bin/* links
for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
rm -f $l
- ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
- | tr -s / \
- | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
+ ln -sf $bindir_rel/${TARGET_PREFIX}`basename $l` $l
done
# Install the libiberty header
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list