#1141300 zlib: support cross building with multilibs

Package:
src:zlib
Source:
src:zlib
Submitter:
Helmut Grohne
Date:
2026-07-13 16:15:01 UTC
Severity:
normal
Tags:
#1141300#5
Date:
2026-07-01 13:05:36 UTC
From:
To:
zlib cannot be cross built from source for multilib-enabled
architectures unless adding the nobiarch build profile, because the
dependency on gcc-multilib is not satisfiable. As we do not have a
-for-host variant for this package, we can depend on
gcc-multilib-TRIPLET instead. This is a bit verbose, but we're not
likely to add more multilib architectures, so that feels like a sane
cost. I'm attaching a suitable patch.

This patch is supposed to establish a baseline of cross build support.
Once it is in, we may consider moving away from gcc-multilib. For
instance in a build for i386, we should be able to call
"x86_64-linux-gnu-gcc" instead of "i686-linux-gnu-gcc -m64" if we depend
on "gcc-x86-64-linux-gnu [i386] <!nobiarch>". It is equally verbose, but
removes one multilib user.

Helmut

#1141300#10
Date:
2026-07-13 12:29:14 UTC
From:
To:
Hi,

The original patch wrongly spelled ppc64 and duplicated mipsn32el. I am
attaching a fixed patch.

Helmut