diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-06-30 21:43:59 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-06-30 21:43:59 +0000 |
commit | a8311020d66c4da2c9052c5c9cd8df178cae3671 (patch) | |
tree | 085eb95b8263d0dbba9dfa6184ebcd453423bb06 | |
parent | dfa9eeadb6d1815ada98d5c0f3fe6bd83e3ef3de (diff) | |
download | upstream-a8311020d66c4da2c9052c5c9cd8df178cae3671.tar.gz upstream-a8311020d66c4da2c9052c5c9cd8df178cae3671.tar.bz2 upstream-a8311020d66c4da2c9052c5c9cd8df178cae3671.zip |
toolchain: fix up lib64 symlink to lib before copying the initial prefix dir to avoid errors on copying
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32556 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | include/toolchain-build.mk | 9 | ||||
-rw-r--r-- | toolchain/binutils/Makefile | 1 | ||||
-rw-r--r-- | toolchain/gcc/initial/Makefile | 2 |
3 files changed, 12 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 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 9d12721dec..c7d21b1dcd 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -83,6 +83,7 @@ define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) \ prefix=$(TOOLCHAIN_DIR)/initial \ install + $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) $(CP) $(TOOLCHAIN_DIR)/initial/. $(TOOLCHAIN_DIR)/ $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf endef diff --git a/toolchain/gcc/initial/Makefile b/toolchain/gcc/initial/Makefile index 3d8ab61cdf..6b0536d83a 100644 --- a/toolchain/gcc/initial/Makefile +++ b/toolchain/gcc/initial/Makefile @@ -29,6 +29,8 @@ define Host/Install cp libgcc.a libgcc_initial.a; \ ) + $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) + $(CP) $(TOOLCHAIN_DIR)/initial/. $(TOOLCHAIN_DIR)/ endef |