summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorThomas De Schampheleire <thomas.de_schampheleire@nokia.com>2017-02-07 22:56:45 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-04-05 21:32:29 +0200
commit68bb926626954732066e79d3811081cd4a82d515 (patch)
tree06c067fb5156f37855142d1090d9b8962f545146 /toolchain
parent144caf5c5b0378b6f508c261c01279636db7eb15 (diff)
downloadbuildroot-68bb926626954732066e79d3811081cd4a82d515.tar.gz
buildroot-68bb926626954732066e79d3811081cd4a82d515.zip
toolchain-external: simplify previously-broken symbolic links
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/helpers.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 5137b5d102..8367a063dc 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 \
OpenPOWER on IntegriCloud