Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv3 08/12] toolchain-external: simplify previously-broken symbolic links
Date: Tue,  7 Feb 2017 22:56:45 +0100	[thread overview]
Message-ID: <20170207215649.364-9-patrickdepinguin@gmail.com> (raw)
In-Reply-To: <20170207215649.364-1-patrickdepinguin@gmail.com>

From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

A previous commit rewrote broken symbolic links in staging, caused by a
non-singular ARCH_LIB_DIR. In this case, the symbolic links are typically
using one or more intermediate directory symlinks, which can be simplified
using the newly introduced simplify_symlink helper.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
v3: no changes
v2: new patch

 toolchain/helpers.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 7bc5498..fda6146 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -63,6 +63,8 @@ copy_toolchain_lib_root = \
 # components, as links to the current directory are always fine.
 # We need to fix the broken links by removing the right amount of ../
 # dots from the link destination.
+# Once the link destination is valid again, it can be simplified to
+# remove the dependency on intermediate directory symlinks.
 #
 # It is possible that ARCH_LIB_DIR does not contain the dynamic loader
 # (ld*.so or similar) because it (or the main symlink to it) normally
@@ -126,6 +128,7 @@ copy_toolchain_sysroot = \
 			LINKTARGET=`readlink $$i` ; \
 			NEWLINKTARGET=$${LINKTARGET\#$$relpath} ; \
 			ln -sf $${NEWLINKTARGET} $$i ; \
+			$(call simplify_symlink,$$i,$(STAGING_DIR)) ; \
 		done ; \
 	fi ; \
 	if [ -e $${ARCH_SYSROOT_DIR}/lib/ld*.so ]; then \
-- 
2.10.2

  parent reply	other threads:[~2017-02-07 21:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 21:56 [Buildroot] [PATCHv3 00/12] toolchain: improvements to copy_toolchain_sysroot and copy_toolchain_lib_root Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 01/12] toolchain-external: reduce nesting in copy_toolchain_sysroot Thomas De Schampheleire
2017-03-01 22:22   ` Thomas Petazzoni
2017-02-07 21:56 ` [Buildroot] [PATCHv3 02/12] toolchain-external: fix broken handling of 'usr/lib/locale' Thomas De Schampheleire
2017-03-01 22:34   ` Thomas Petazzoni
2017-02-07 21:56 ` [Buildroot] [PATCHv3 03/12] toolchain-external: clarify rsync excludes in copy_toolchain_sysroot Thomas De Schampheleire
2017-02-07 23:03   ` Romain Naour
2017-02-08  9:22     ` Thomas De Schampheleire
2017-02-08  9:45       ` Thomas Petazzoni
2017-02-07 21:56 ` [Buildroot] [PATCHv3 04/12] toolchain-external: handle ld.so fixups centrally Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 05/12] toolchain helpers: introduce function relpath_prefix Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 06/12] toolchain-external: cover multilib toolchains with lib/<variant> layout Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 07/12] toolchain helpers: introduce simplify_symlink Thomas De Schampheleire
2017-02-07 21:56 ` Thomas De Schampheleire [this message]
2017-02-07 21:56 ` [Buildroot] [PATCHv3 09/12] toolchain: copy_toolchain_lib_root: remove unused variable LIBDIR Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 10/12] toolchain: copy_toolchain_lib_root: clarify logic Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 11/12] toolchain: copy_toolchain_lib_root: clarify input parameter Thomas De Schampheleire
2017-02-07 21:56 ` [Buildroot] [PATCHv3 12/12] toolchain: copy_toolchain_lib_root: copy symlinks instead of recreating them Thomas De Schampheleire
2017-04-05 19:54 ` [Buildroot] [PATCHv3 00/12] toolchain: improvements to copy_toolchain_sysroot and copy_toolchain_lib_root Thomas Petazzoni
2017-04-05 20:15   ` Thomas De Schampheleire
2017-04-06 17:09     ` Thomas Petazzoni
2017-04-06 17:51       ` Thomas De Schampheleire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170207215649.364-9-patrickdepinguin@gmail.com \
    --to=patrickdepinguin@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox