Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
@ 2013-07-28 16:48 Axel Lin
  2013-07-28 16:59 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2013-07-28 16:48 UTC (permalink / raw)
  To: buildroot

ldd.host and ldconfig.host will be built only when HAVE_SHARED=y.

This fixes below build error when
 # BR2_BFIN_FLAT is not set
 # ARCH_HAS_MMU is not set
 UCLIBC_FORMAT_FLAT=y

make[1]: Leaving directory `/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2'
/usr/bin/install -D -m 0755 /opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host /opt/test/buildroot/buildroot/output/host/usr/bin/ldd
/usr/bin/install: cannot stat '/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host': No such file or directory
make: *** [/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/.stamp_staging_installed] Error 1

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 package/uclibc/uclibc.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 644c531..1fe1a40 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -514,10 +514,12 @@ endef
 # For FLAT binfmts (static) there are no host utils
 ifeq ($(BR2_BINFMT_FLAT),)
 define UCLIBC_INSTALL_UTILS_STAGING
-	$(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd
-	ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd
-	$(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig
-	ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig
+	if grep -q HAVE_SHARED=y $(@D)/.config; then \
+		$(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd; \
+		ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd; \
+		$(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig; \
+		ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \
+	fi
 endef
 endif
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-31 17:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-28 16:48 [Buildroot] [PATCH] uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED Axel Lin
2013-07-28 16:59 ` Thomas Petazzoni
2013-07-28 17:17   ` Axel Lin
2013-07-28 17:22     ` Thomas Petazzoni
2013-07-28 17:30       ` Axel Lin
2013-07-29  7:15         ` Thomas Petazzoni
2013-07-31 17:20       ` Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox