All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] toolchain: glibc: improve library checking
@ 2010-12-12 16:56 Mike Frysinger
  2010-12-13 21:29 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2010-12-12 16:56 UTC (permalink / raw)
  To: buildroot

If the source sysroot has symlinks to the ldso, the globs might match more
than one file, and test fails due to too many arguments.  So move the glob
into a for loop and test each result that way.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 toolchain/helpers.mk |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 674e7b4..166f290 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -150,10 +150,13 @@ check_glibc_feature = \
 #
 check_glibc = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld-linux*.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \
-		echo "Incorrect selection of the C library"; \
-		exit -1; \
-	fi; \
+	for l in $${SYSROOT_DIR}/lib/ld-linux*.so.* $${SYSROOT_DIR}/lib/ld.so.* ""; do \
+		if test -z "$$l"; then \
+			echo "Incorrect selection of the C library"; \
+			exit 1; \
+		fi; \
+		test -f $$l && break; \
+	done; \
 	$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
 	$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
 	$(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\
-- 
1.7.3.3

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

end of thread, other threads:[~2010-12-13 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 16:56 [Buildroot] [PATCH] toolchain: glibc: improve library checking Mike Frysinger
2010-12-13 21:29 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.