Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Jul 2023 02:30:01 -0500
From: "A. Wilcox" <AWilcox@...cox-Tech.com>
To: musl@...ts.openwall.com
Subject: Re: __MUSL__ macro

On Jul 7, 2023, at 2:14 AM, Alastair Houghton <ahoughton@...le.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.
Content of type "text/html" skipped

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.