Subject: Re: bug#76550: 30.1; Test failure for fns-tests-collate-strings with musl libc

From: Ulrich Müller <[email-masked]>
Date: Tue, 25 Feb 2025 19:27:53 +0100

>>>>> On Tue, 25 Feb 2025, Eli Zaretskii wrote:

> Are musl builds guaranteed to have "-musl" in system-configuration?
> Or is that just in the builds you are doing?

musl.m4 from Gnulib does this:

  case "$host_os" in
    *-musl* | midipix*)
      AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.])
      ;;
  esac

> II thought about using some musl-specific symbol, or even creating one
> if none already exists.

I cannot find any such symbol in the sources.

Presumably, the most specific feature check would be for the return
value of newlocale(3), depending on its second argument. Then again,
newlocale is called by str_collate (in sysdep.c), which in turn is
called by string-collate-equalp.

Effectively, the test checks for the exact feature that we need, in
order to decide whether the test should be called. :) IMHO it is pretty
much pointless.