config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for musl


From: Henri
Subject: Re: Support for musl
Date: Thu, 25 Jan 2018 16:14:24 +1300

On Thu, 2018-01-25 at 13:58 +1100, Ben Elliston wrote:
> On Thu, Jan 25, 2018 at 03:46:59PM +1300, Henri wrote:
> 
> > 
> > The config.guess script currently only checks for the glibc, uclibc,
> > and dietlibc libraries. The attached patch adds support for the musl
> > C library. Unfortunately, features.h in musl does not define a
> > __MUSL__ macro (or similar) which is why this has to be the new
> > default case instead of glibc. If features.h or a C compiler are not
> > available it will default to gnu as before.
> I'm not crash hot on this patch, sorry.  The next time we get a new C
> library that also fails to identify itself through some means, we're
> hosed as we won't be able to distinguish it from MUSL.
> 
> Can you please add some mechanism to MUSL and then we can check for
> that?  Obviously there will be a period where old MUSL versions won't
> be guessed, but the user can specify those with --build, --host or
> --target.

Sorry, I am not a musl developer and their policy strictly forbids identifying 
itself, see the
section "Why is there no __MUSL__ macro?" in the FAQ at 
https://wiki.musl-libc.org/faq.html

Another option to determine the libc version would be to parse the output of 
"ldd --version".  On
Ubuntu this gives

$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu10) 2.23
...

And on the musl-based Alpine Linux

$ ldd --version
musl libc (x86_64)
Version 1.1.18
...

However I am neither sure whether ldd is required by POSIX nor whether it is 
required to report the
libc version.

Best regards, Henri

> 
> Cheers, Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]