Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200920171446.GB3265@brightrain.aerifal.cx>
Date: Sun, 20 Sep 2020 13:14:46 -0400
From: Rich Felker <dalias@...c.org>
To: Bruno Haible <bruno@...sp.org>, "Dmitry V. Levin" <ldv@...linux.org>,
	config-patches@....org, musl@...ts.openwall.com
Subject: Re: Re: OS detection wrong on Alpine Linux 3.10

On Sun, Sep 20, 2020 at 03:56:29PM +0200, Szabolcs Nagy wrote:
> * Bruno Haible <bruno@...sp.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.