* [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
* [Buildroot] [PATCH] toolchain: glibc: improve library checking
2010-12-12 16:56 [Buildroot] [PATCH] toolchain: glibc: improve library checking Mike Frysinger
@ 2010-12-13 21:29 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2010-12-13 21:29 UTC (permalink / raw)
To: buildroot
Hello Mike,
On Sun, 12 Dec 2010 11:56:25 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> 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.
Here as well, could you give a specific example of a toolchain that
exhibits the problem ?
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox