Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] toolchain/helpers.mk: fix check-musl
@ 2014-12-03 23:13 Jörg Krause
  2014-12-08 19:32 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Jörg Krause @ 2014-12-03 23:13 UTC (permalink / raw)
  To: buildroot

check_musl works fine for the external musl 1.1.1 toolchain which is downloaded
and installed, but fails for a musl toolchain which, in a first step is build
by the internal toolchain backend of Buildroot, and in a second step is copied
to an external directory and imported as an custom external toolchain (in a new
configuration).

In case of the downloaded musl 1.1.1 toolchain the libc.so and libm.a files
reside in the sysroot/lib directory and sysroot/usr/lib is a symlink to
sysroot/lib.

In case of the custom musl toolchain build by Buildroot the files reside in
sysroot/usr/lib which is not a symlink.

To let check_musl detect the custom musl toolchain correctly test for libc.so
and lib.m in sysroot/usr/lib which works in both cases.

Signed-off-by: J?rg Krause <jkrause@posteo.de>
---
 toolchain/helpers.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 3121da4..425a448 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -229,7 +229,7 @@ check_glibc = \
 # $1: sysroot directory
 check_musl = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if test ! -f $${SYSROOT_DIR}/lib/libc.so -o -e $${SYSROOT_DIR}/lib/libm.so ; then \
+	if test ! -f $${SYSROOT_DIR}/usr/lib/libc.so -o -e $${SYSROOT_DIR}/usr/lib/libm.so ; then \
 		echo "Incorrect selection of the C library" ; \
 		exit -1; \
 	fi
-- 
2.1.3

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

end of thread, other threads:[~2014-12-09  1:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 23:13 [Buildroot] [PATCH 1/1] toolchain/helpers.mk: fix check-musl Jörg Krause
2014-12-08 19:32 ` Thomas Petazzoni
2014-12-08 21:17   ` Jörg Krause
2014-12-08 21:21     ` Thomas Petazzoni
2014-12-09  1:22       ` Jörg Krause

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