config-patches
[Top][All Lists]
Advanced

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

Re: [musl] Re: OS detection wrong on Alpine Linux 3.10


From: Rich Felker
Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10
Date: Sun, 20 Sep 2020 13:14:46 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Sep 20, 2020 at 03:56:29PM +0200, Szabolcs Nagy wrote:
> * Bruno Haible <bruno@clisp.org> [2020-09-20 13:19:13 +0200]:
> > Dmitry V. Levin wrote:
> > > Is this __DEFINED_va_list macro the official way of detecting musl?
> > 
> > No, but in a world where the musl people don't want to provide an official
> > way [1][2] and the Alpine Linux people break their previously working way of
> > detecting musl [3], we (GNU) need to use our own heuristics to fulfil the
> > practical need of programs (especially test suites) to distinguish musl
> > systems from glibc systems.
> 
> we have not seen a "practical need of programs
> to distinguish musl systems from glibc systems".
> 
> instead we have seen a practical need to detect
> specific c runtime behaviours and extensions.
> 
> even in the glibc world using __GLIBC__ to detect
> features is not reliable since there are heavily
> patched glibcs out there. (though the way glibc
> handles api and abi stability means it mostly
> works, but this is unreasonable to expect across
> different implementations)

There is one kinda legitimate purpose for detecting specifically musl:
when setting $target to match $host for the purpose of a
host-targeting compiler toolchain. That does not seem to be the topic
at hand here, though.

Please note that __DEFINED_* are bits/alltypes.h-internal macros, and
are not public interfaces for detecting musl or definition status of
any particular type. They are not even "public within musl" -- i.e.
musl source files or public headers outside bits/alltypes.h are not
allowed to use or poke at them. Their naming or the entire mechanism
is subject to change at any time.

Rich



reply via email to

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