Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] Fix binutils symlinks
@ 2018-10-05 11:44 Achille Fouilleul
  2018-10-05 12:03 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Achille Fouilleul @ 2018-10-05 11:44 UTC (permalink / raw)
  To: openembedded-core

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@gadz.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 37813dd864..8af48e735b 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -128,12 +128,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
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for Fix binutils symlinks
  2018-10-05 11:44 [PATCH] Fix binutils symlinks Achille Fouilleul
@ 2018-10-05 12:03 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-10-05 12:03 UTC (permalink / raw)
  To: Achille Fouilleul; +Cc: openembedded-core

== Series Details ==

Series: Fix binutils symlinks
Revision: 1
URL   : https://patchwork.openembedded.org/series/14382/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            Fix binutils symlinks
 Issue             Shortlog does not follow expected format [test_shortlog_format] 
  Suggested fix    Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-05 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-05 11:44 [PATCH] Fix binutils symlinks Achille Fouilleul
2018-10-05 12:03 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox