mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
To: musl@lists.openwall.com
Subject: Re: [musl] __MUSL__ macro
Date: Fri, 7 Jul 2023 02:30:01 -0500	[thread overview]
Message-ID: <D9A8DBB2-C4E0-4F86-8DE8-EFC59818FF8D@Wilcox-Tech.com> (raw)
In-Reply-To: <ADA97FB8-5654-4DBB-AE27-0055885439F3@apple.com>

[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]

On Jul 7, 2023, at 2:14 AM, Alastair Houghton <ahoughton@apple.com> wrote:
> 
> There are two situations where the lack of macros is absolutely a problem and there isn’t a sane workaround.
> 
> 1. You’re cross compiling and the thing you’re interested in is *runtime* behaviour, so configure-style checks simply aren’t an option.  In a cross-compilation situation the only thing they can test is that a program will *build*; they can’t test its behaviour since you don’t necessarily have anywhere to run it.
> 
> 2. You’re in a header-only library, particularly one where the final environment you’re running in wasn’t available at whatever configuration time you had, assuming you had one at all.  A really good example of this is the built-in headers in Clang or GCC, but the problem also applies to things like STL or Boost.


These were two of the situations that I highlighted last year in my article on this ( https://catfox.life/2022/04/16/the-musl-preprocessor-debate/ ).

My proposal obviates the need for a PREREQ-style macro because user-facing behavioural differences would be tracked by the monotonically increasing number.  I suppose the next bikeshed would be determining when to increase and when not to, but I don’t think we should open that up here.

*As a distro maintainer* I think the backport argument is flimsy at best (I already cover that in my article) and insulting at worst.  It implies that distro maintainers aren’t capable of understanding what they are backporting.  If you do not trust distros to package musl properly, then you have two options: tell them to stop shipping it, or let them keep their broken mess.  Don’t handicap the developers and engineers of user-facing software because you don’t trust distros.

We’ve looked at bringing Swift over to Adélie before, and found that it would be too much to port by ourselves.  I’m quite excited to see upstream interest and hope that the community writ large can help out where possible.  I’m also hopeful that the maintainers at musl take the need for some sort of preprocessor macro more seriously.

Best regards,
-A.

--
A. Wilcox (they/them)
SW Engineering: C++/Rust, DevOps, POSIX, Py/Ruby
Wilcox Technologies Inc.

[-- Attachment #2: Type: text/html, Size: 2809 bytes --]

  reply	other threads:[~2023-07-07  7:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 10:48 Alastair Houghton
2023-07-06 12:17 ` Alex Xu
2023-07-06 16:26   ` Szabolcs Nagy
2023-07-07  7:14   ` Alastair Houghton
2023-07-07  7:30     ` A. Wilcox [this message]
2023-07-07  8:24       ` Alastair Houghton
2023-07-07 11:20     ` Laurent Bercot
2023-07-07 11:45     ` Jeffrey Walton
2023-07-07 13:53     ` Rich Felker
2023-07-07 14:18       ` Alastair Houghton
2023-07-07 12:47 ` Rich Felker
2023-07-07 13:14   ` Alastair Houghton
2023-07-07 14:19     ` Markus Wichmann
2023-07-07 14:26       ` Markus Wichmann
2023-07-07 14:46       ` Alastair Houghton
2023-07-07 15:02       ` Andrew Bell
2023-07-07 15:19         ` Markus Wichmann
2023-07-07 15:24           ` Andrew Bell
2023-07-07 15:34           ` Alastair Houghton
2023-07-07 15:45             ` Rich Felker
2023-07-07 15:58               ` Alastair Houghton
2023-07-07 15:05     ` i262jq

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=D9A8DBB2-C4E0-4F86-8DE8-EFC59818FF8D@Wilcox-Tech.com \
    --to=awilcox@wilcox-tech.com \
    --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).