summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/binutils/binutils.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index be9e652e10..1c05958f9c 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -132,12 +132,13 @@ endif
# Hardlinks between binaries in different directories cause a problem
# with rpath fixup, so we de-hardlink those binaries, and replace them
-# with symbolic links.
+# with copies instead.
BINUTILS_TOOLS = ar as ld ld.bfd nm objcopy objdump ranlib readelf strip
define HOST_BINUTILS_FIXUP_HARDLINKS
$(foreach tool,$(BINUTILS_TOOLS),\
- rm -f $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool) ; \
- ln -s ../../bin/$(GNU_TARGET_NAME)-$(tool) $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool)
+ rm -f $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool) && \
+ cp -a $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-$(tool) \
+ $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool)
)
endef
HOST_BINUTILS_POST_INSTALL_HOOKS += HOST_BINUTILS_FIXUP_HARDLINKS
OpenPOWER on IntegriCloud