* [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
* [Buildroot] [PATCH 1/1] toolchain/helpers.mk: fix check-musl
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
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-12-08 19:32 UTC (permalink / raw)
To: buildroot
Dear J?rg Krause,
On Thu, 4 Dec 2014 00:13:59 +0100, J?rg Krause wrote:
> 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.
Actually, I am not sure this is the best fix we could do. Having the C
library installed in /usr/lib in the sysroot is a bit weird, and I
believe we should rather fix the Buildroot musl package to ensure that
the C library gets installed in /lib instead.
Do you want to have a look into this?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain/helpers.mk: fix check-musl
2014-12-08 19:32 ` Thomas Petazzoni
@ 2014-12-08 21:17 ` Jörg Krause
2014-12-08 21:21 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Jörg Krause @ 2014-12-08 21:17 UTC (permalink / raw)
To: buildroot
On Mo, 2014-12-08 at 20:32 +0100, Thomas Petazzoni wrote:
> Dear J?rg Krause,
>
> On Thu, 4 Dec 2014 00:13:59 +0100, J?rg Krause wrote:
> > 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.
>
> Actually, I am not sure this is the best fix we could do. Having the C
> library installed in /usr/lib in the sysroot is a bit weird, and I
> believe we should rather fix the Buildroot musl package to ensure that
> the C library gets installed in /lib instead.
>
> Do you want to have a look into this?
I'm not a toolchain expert, but I will have a look at it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain/helpers.mk: fix check-musl
2014-12-08 21:17 ` Jörg Krause
@ 2014-12-08 21:21 ` Thomas Petazzoni
2014-12-09 1:22 ` Jörg Krause
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-12-08 21:21 UTC (permalink / raw)
To: buildroot
Dear J?rg Krause,
On Mon, 08 Dec 2014 22:17:03 +0100, J?rg Krause wrote:
> > Do you want to have a look into this?
>
> I'm not a toolchain expert, but I will have a look at it.
It might either be that we need --prefix=/ in musl.mk, or maybe
--prefix=/usr --libdir=/lib or something like that.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain/helpers.mk: fix check-musl
2014-12-08 21:21 ` Thomas Petazzoni
@ 2014-12-09 1:22 ` Jörg Krause
0 siblings, 0 replies; 5+ messages in thread
From: Jörg Krause @ 2014-12-09 1:22 UTC (permalink / raw)
To: buildroot
On Mo, 2014-12-08 at 22:21 +0100, Thomas Petazzoni wrote:
> Dear J?rg Krause,
>
> On Mon, 08 Dec 2014 22:17:03 +0100, J?rg Krause wrote:
>
> > > Do you want to have a look into this?
> >
> > I'm not a toolchain expert, but I will have a look at it.
>
> It might either be that we need --prefix=/ in musl.mk, or maybe
> --prefix=/usr --libdir=/lib or something like that.
--libdir=/lib does the trick. Many thanks! I will prepare a patch soon.
^ permalink raw reply [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