From: Rich Felker <dalias@libc.org>
To: Bruno Haible <bruno@clisp.org>,
"Dmitry V. Levin" <ldv@altlinux.org>,
config-patches@gnu.org, musl@lists.openwall.com
Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10
Date: Sun, 20 Sep 2020 13:14:46 -0400 [thread overview]
Message-ID: <20200920171446.GB3265@brightrain.aerifal.cx> (raw)
In-Reply-To: <20200920135629.GI2947641@port70.net>
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
next prev parent reply other threads:[~2020-09-20 17:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4768019.hHWyC0TzgU@omega>
2020-09-20 10:12 ` Dmitry V. Levin
2020-09-20 11:19 ` Bruno Haible
2020-09-20 12:18 ` Ariadne Conill
2020-09-20 13:56 ` Szabolcs Nagy
2020-09-20 17:14 ` Rich Felker [this message]
2020-09-20 19:21 ` Bruno Haible
2020-09-20 20:58 ` Hadrien Lacour
2020-09-21 6:53 ` A. Wilcox
2020-09-21 11:46 ` Florian Weimer
2020-09-22 18:46 ` Rich Felker
2020-09-22 20:18 ` Bruno Haible
2020-09-22 20:33 ` Jeffrey Walton
2020-09-22 20:39 ` Jeffrey Walton
2020-09-22 21:04 ` Laurent Bercot
2020-09-22 21:17 ` Jeffrey Walton
2020-09-23 8:49 ` Laurent Bercot
2020-09-23 13:13 ` James Y Knight
2020-09-23 16:08 ` Rich Felker
2020-09-23 16:16 ` Jeffrey Walton
2020-09-23 16:26 ` Ariadne Conill
2020-09-23 16:57 ` Jeffrey Walton
2020-09-23 16:36 ` Rich Felker
2020-09-20 12:19 ` Ariadne Conill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200920171446.GB3265@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=bruno@clisp.org \
--cc=config-patches@gnu.org \
--cc=ldv@altlinux.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).