Bug#1131165: gcc-15 FTBFS for musl-linux-amd64

Helmut Grohne <[email protected]> Mon, 4 May 2026 13:16:38 +0200
Newsgroups gmane.linux.debian.devel.gcc
Message-ID <20260504111638.GA502316__39421.0438172863$1777999174$gmane$org@subdivi.de>
Hi Matthias,

On Fri, May 01, 2026 at 10:59:46AM +0200, Matthias Klose wrote:
> please check if that works for you:
> 
> --- a/debian/rules.defs
> +++ b/debian/rules.defs
> @@ -2044,6 +2044,14 @@ ifeq ($(derivative),Ubuntu)
>  else ifeq ($(derivative),Debian)
>    biarchx32archs := /amd64/i386/
>  endif
> +
> +ifneq (,$(findstring musl, $(DEB_TARGET_GNU_TYPE)))
> +  biarch32archs  :=
> +  biarch64archs  :=
> +  biarchn32archs :=
> +  biarchx32archs :=
> +endif
> +
>  $(foreach x,32 64 n32 x32,$(eval $(call gen_biarch,$(x))))
> 
>  ifeq ($(DEB_TARGET_ARCH),sh4)

Your proposed patch does not work for me. My build performs a multilib
configuration and that happens to fail. In particular, your patch does
not cause the --disable-multilib flag to be passed to configure.

I have two remarks. Your patch resets those variables /after/ they have
been used to populate e.g. ${biarch32} (lines 1886 to 1895) as your hunk
comes later (lines 2044 and later). This is further contrieved by the
fact that even current rules.defs modifies biarch32archs and friends
(around line 2019) after they have been used for matching (see above).

I find the use of findstring with DEB_TARGET_GNU_TYPE unfortunate. Such
matching has bitten us earlier (e.g. with the "arc" architecture).
Please use something like "ifneq (musl,$(DEB_TARGET_ARCH_LIBC))"
instead.

Helmut