summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-07-05 18:58:58 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-07-06 07:58:46 +0200
commite774eb0c9d75d4d86c25cd45e5728e80e92b8ff0 (patch)
treec51a4d61011b7815a896df0d83099728eafd8e9f /toolchain
parent914f19ca1ea648d451bfa2ab232dbf1cc1fed351 (diff)
downloadbuildroot-novena-e774eb0c9d75d4d86c25cd45e5728e80e92b8ff0.tar.gz
buildroot-novena-e774eb0c9d75d4d86c25cd45e5728e80e92b8ff0.zip
external-toolchain: create lib64 symlinks if needed
Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the target and staging directories. This is needed for some 64 bits toolchains such as the Crosstool-NG toolchains, for which the path to the dynamic loader and other libraries is /lib64, but the libraries are stored in /lib. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/external-toolchain/ext-tool.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index a181f25e1..d5a64b594 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -133,6 +133,19 @@ copy_toolchain_sysroot = \
find $(STAGING_DIR) -type d | xargs chmod 755
#
+# Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the
+# target and staging directories. This is needed for some 64 bits
+# toolchains such as the Crosstool-NG toolchains, for which the path
+# to the dynamic loader and other libraries is /lib64, but the
+# libraries are stored in /lib.
+#
+create_lib64_symlinks = \
+ (cd $(TARGET_DIR) ; ln -s lib lib64) ; \
+ (cd $(TARGET_DIR)/usr ; ln -s lib lib64) ; \
+ (cd $(STAGING_DIR) ; ln -s lib lib64) ; \
+ (cd $(STAGING_DIR)/usr ; ln -s lib lib64)
+
+#
# Check the availability of a particular glibc feature. We assume that
# all Buildroot toolchain options are supported by glibc, so we just
# check that they are enabled.
@@ -319,4 +332,8 @@ endif
done
@echo "Copy external toolchain sysroot to staging..."
$(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR))
+ # Create lib64 symbolic links if needed
+ $(Q)if [ -L $(ARCH_SYSROOT_DIR)/lib64 ] ; then \
+ $(call create_lib64_symlinks) ; \
+ fi
@touch $@