From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_PDS_OTHER_BAD_TLD, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6398 invoked from network); 7 Jul 2023 07:30:30 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2023 07:30:30 -0000 Received: (qmail 10218 invoked by uid 550); 7 Jul 2023 07:30:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 10185 invoked from network); 7 Jul 2023 07:30:26 -0000 From: "A. Wilcox" Content-Type: multipart/alternative; boundary="Apple-Mail=_4D8ACD4E-16CD-41A2-8991-CC27FECF61EE" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Date: Fri, 7 Jul 2023 02:30:01 -0500 References: <309EDCC9-2402-46B5-BDBD-B96677E470DD@apple.com> <168864586814.64499.13397704850676744237@alexps.local> To: musl@lists.openwall.com In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3731.400.51.1.1) Subject: Re: [musl] __MUSL__ macro --Apple-Mail=_4D8ACD4E-16CD-41A2-8991-CC27FECF61EE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Jul 7, 2023, at 2:14 AM, Alastair Houghton = wrote: >=20 > There are two situations where the lack of macros is absolutely a = problem and there isn=E2=80=99t a sane workaround. >=20 > 1. You=E2=80=99re cross compiling and the thing you=E2=80=99re = interested in is *runtime* behaviour, so configure-style checks simply = aren=E2=80=99t an option. In a cross-compilation situation the only = thing they can test is that a program will *build*; they can=E2=80=99t = test its behaviour since you don=E2=80=99t necessarily have anywhere to = run it. >=20 > 2. You=E2=80=99re in a header-only library, particularly one where the = final environment you=E2=80=99re running in wasn=E2=80=99t 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=E2=80=99t 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=E2=80=99t 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=E2=80=99t handicap the developers = and engineers of user-facing software because you don=E2=80=99t trust = distros. We=E2=80=99ve looked at bringing Swift over to Ad=C3=A9lie before, and = found that it would be too much to port by ourselves. I=E2=80=99m quite = excited to see upstream interest and hope that the community writ large = can help out where possible. I=E2=80=99m 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.= --Apple-Mail=_4D8ACD4E-16CD-41A2-8991-CC27FECF61EE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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=E2=80=99t = a sane workaround.

1. You=E2=80=99re cross compiling and the = thing you=E2=80=99re interested in is *runtime* behaviour, so = configure-style checks simply aren=E2=80=99t an option.  In a = cross-compilation situation the only thing they can test is that a = program will *build*; they can=E2=80=99t test its behaviour since you = don=E2=80=99t necessarily have anywhere to run it.

2. You=E2=80=99r= e in a header-only library, particularly one where the final environment = you=E2=80=99re running in wasn=E2=80=99t 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 = ( http= s://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=E2=80=99t 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=E2=80=99t 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=E2=80=99t handicap the developers and engineers = of user-facing software because you don=E2=80=99t trust = distros.

We=E2=80=99ve looked at bringing Swift = over to Ad=C3=A9lie before, and found that it would be too much to port = by ourselves.  I=E2=80=99m quite excited to see upstream interest = and hope that the community writ large can help out where possible. =  I=E2=80=99m 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.
= --Apple-Mail=_4D8ACD4E-16CD-41A2-8991-CC27FECF61EE--