install ldconfig stuff only if it was built, fix for systems without shared libraries...
authorIvan Kuten <ivan.kuten@promwad.com>
Thu, 15 Nov 2007 10:16:55 +0000 (10:16 -0000)
committerIvan Kuten <ivan.kuten@promwad.com>
Thu, 15 Nov 2007 10:16:55 +0000 (10:16 -0000)
toolchain/uClibc/uclibc.mk

index 9ce47289ab996f8c5a86b7a7d4e0e33a2b4ac555..ebed4a03aa0393f4462940c84fff4c6d0862d4eb 100644 (file)
@@ -450,11 +450,15 @@ endif
                PREFIX=$(STAGING_DIR) \
                HOSTCC="$(HOSTCC)" \
                hostutils
-       install -c $(UCLIBC_DIR)/utils/ldd.host $(STAGING_DIR)/usr/bin/ldd
-       ln -sf ldd $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldd
-       install -c $(UCLIBC_DIR)/utils/ldconfig.host $(STAGING_DIR)/usr/bin/ldconfig
-       ln -sf ldconfig $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldconfig
-       ln -sf ldconfig $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig
+       if [ -f $(UCLIBC_DIR)/utils/ldd.host ]; then \
+               install -c $(UCLIBC_DIR)/utils/ldd.host $(STAGING_DIR)/usr/bin/ldd; \
+               ln -sf ldd $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldd; \
+       fi
+       if [ -f $(UCLIBC_DIR)/utils/ldconfig.host ]; then \
+               install -c $(UCLIBC_DIR)/utils/ldconfig.host $(STAGING_DIR)/usr/bin/ldconfig; \
+               ln -sf ldconfig $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldconfig; \
+               ln -sf ldconfig $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \
+       fi
        touch -c $@
 
 ifneq ($(TARGET_DIR),)