summaryrefslogtreecommitdiffstats
path: root/include/toolchain-build.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-30 21:43:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-06-30 21:43:59 +0000
commit59b384dabe20a4930b1c8ff4e0f48367cc080662 (patch)
tree6ac131f5e45f9a81bb898064ae837547eee316da /include/toolchain-build.mk
parente98810dced1a6713d6bd0182c0c1b605446429de (diff)
downloadmaster-31e0f0ae-59b384dabe20a4930b1c8ff4e0f48367cc080662.tar.gz
master-31e0f0ae-59b384dabe20a4930b1c8ff4e0f48367cc080662.tar.bz2
master-31e0f0ae-59b384dabe20a4930b1c8ff4e0f48367cc080662.zip
toolchain: fix up lib64 symlink to lib before copying the initial prefix dir to avoid errors on copying
SVN-Revision: 32556
Diffstat (limited to 'include/toolchain-build.mk')
-rw-r--r--include/toolchain-build.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/toolchain-build.mk b/include/toolchain-build.mk
index a0bc4061fc..d2fdb0281a 100644
--- a/include/toolchain-build.mk
+++ b/include/toolchain-build.mk
@@ -16,3 +16,12 @@ TOOLCHAIN_JOBS?=$(if $(CONFIG_TOOLCHAIN_PARALLEL),-j$(CONFIG_PKG_BUILD_JOBS))
include $(INCLUDE_DIR)/host-build.mk
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared
+
+define FixupLibdir
+ if [ -d $(1)/lib64 -a \! -L $(1)/lib64 ]; then \
+ mkdir -p $(1)/lib; \
+ mv $(1)/lib64/* $(1)/lib/; \
+ rm -rf $(1)/lib64; \
+ fi
+ ln -sf lib $(1)/lib64
+endef