summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-08-09 15:37:56 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-02 16:06:19 +0200
commit3bc53c891db1bfc9a093f362a84431cdfe3327f8 (patch)
tree1502065d431f1b802ad49977a86dbfe9248fa1bd
parent726f4cad6b127ade2db52e6a8e02b2c8a581320f (diff)
downloadOSELAS.Toolchain-3bc53c891db1bfc9a093f362a84431cdfe3327f8.tar.gz
cross-binutils: use symlinks instead of hardlinks
This makes it less likely to accidentally duplicate the file. Also, Debian uses symlinks for this as well. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/cross-binutils.make7
1 files changed, 7 insertions, 0 deletions
diff --git a/rules/cross-binutils.make b/rules/cross-binutils.make
index 7d52201..5292913 100644
--- a/rules/cross-binutils.make
+++ b/rules/cross-binutils.make
@@ -64,12 +64,19 @@ CROSS_BINUTILS_CONF_OPT := \
$(STATEDIR)/cross-binutils.install:
@$(call targetinfo)
@$(call world/install, CROSS_BINUTILS)
+# # this link first in case it is moved to $(COMPILER_PREFIX)ld.real
+ @ln -vsf $(COMPILER_PREFIX)ld.bfd \
+ $(CROSS_BINUTILS_PKGDIR)$(PTXCONF_PREFIX_CROSS)/bin/$(COMPILER_PREFIX)ld
ifdef PTXCONF_CROSS_BINUTILS_LD_REAL
mv -v $(CROSS_BINUTILS_PKGDIR)$(PTXCONF_PREFIX_CROSS)/bin/$(COMPILER_PREFIX)ld \
$(CROSS_BINUTILS_PKGDIR)$(PTXCONF_PREFIX_CROSS)/bin/$(COMPILER_PREFIX)ld.real
mv -v $(CROSS_BINUTILS_PKGDIR)$(PTXCONF_PREFIX_CROSS)/$(PTXCONF_GNU_TARGET)/bin/ld \
$(CROSS_BINUTILS_PKGDIR)$(PTXCONF_PREFIX_CROSS)/$(PTXCONF_GNU_TARGET)/bin/ld.real
endif
+# # these links last to ensure that ld.real points to $(COMPILER_PREFIX)ld.real
+ @for bin in $(CROSS_BINUTILS_PKGDIR)$(PTXCONF_PREFIX_CROSS)/$(PTXCONF_GNU_TARGET)/bin/*; do \
+ ln -vsf ../../bin/$(COMPILER_PREFIX)$$(basename $${bin}) $${bin} || break; \
+ done
mkdir -p "$(CROSS_GCC_FIRST_PREFIX)/$(PTXCONF_GNU_TARGET)/bin"
for file in \